Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/terminal.py
diff options
context:
space:
mode:
authorDaniel Francis <francis@sugarlabs.org>2012-09-26 16:12:37 (GMT)
committer Daniel Francis <francis@sugarlabs.org>2012-09-26 16:12:37 (GMT)
commitfb2d170f73b404e78ffd86d4777ab6edeb470cae (patch)
treeac57119a9216dcafd4241748641a92f04eb6eb50 /terminal.py
parentee19ee6f882557dfe127acaa3c0a08c2044c8763 (diff)
Expand tabs properly
- If there is only one tab, it'll have the notebook with divided by two. - If there are more tabs they are expanded correctly. So this commit also corrects the expanding algorithm of the tabs. Minor change: Remove some lines from the old tab toolbar.
Diffstat (limited to 'terminal.py')
-rw-r--r--terminal.py12
1 files changed, 1 insertions, 11 deletions
diff --git a/terminal.py b/terminal.py
index 63c0d61..4245874 100644
--- a/terminal.py
+++ b/terminal.py
@@ -219,9 +219,6 @@ class TerminalActivity(activity.Activity):
if self._notebook.get_n_pages() == 2:
self._notebook.get_tab_label(self._notebook.get_nth_page(0
)).show_close_button()
- self._delete_tab_button.props.sensitive = True
- self._previous_tab_button.props.sensitive = True
- self._next_tab_button.props.sensitive = True
def __close_tab_cb(self, btn, child):
index = self._notebook.page_num(child)
@@ -229,11 +226,6 @@ class TerminalActivity(activity.Activity):
if self._notebook.get_n_pages() == 1:
self._notebook.get_tab_label(self._notebook.get_nth_page(0
)).hide_close_button()
- self._delete_tab_button.props.sensitive = False
- self._previous_tab_button.props.sensitive = False
- self._next_tab_button.props.sensitive = False
-
- self._notebook.update_tab_sizes()
def __prev_tab_cb(self, btn):
if self._notebook.props.page == 0:
@@ -311,15 +303,13 @@ class TerminalActivity(activity.Activity):
index = self._notebook.append_page(box, tablabel)
tablabel.show_all()
- self._notebook.update_tab_sizes()
- self._notebook.show_all()
-
# Uncomment this to only show the tab bar when there is at least
# one tab. I think it's useful to always see it, since it displays
# the 'window title'.
# self._notebook.props.show_tabs = self._notebook.get_n_pages() > 1
tablabel.hide_close_button() if self._notebook.get_n_pages() == 1\
else None
+ self._notebook.show_all()
# Launch the default shell in the HOME directory.
os.chdir(os.environ["HOME"])