From a8184adbb7a99087a0356c5e6879c06f019e32d9 Mon Sep 17 00:00:00 2001 From: "Francis Smit (Grizzly)" Date: Sat, 19 Nov 2011 22:04:29 +1100 Subject: [PATCH 1/3] have added a config for the homogeneous property to terminator, so u can set homogeneous to False in the config file to to this I added a line to config.py and changed a line in notebook.py --- terminatorlib/config.py | 1 + terminatorlib/notebook.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/terminatorlib/config.py b/terminatorlib/config.py index 53307641..98307b6a 100755 --- a/terminatorlib/config.py +++ b/terminatorlib/config.py @@ -86,6 +86,7 @@ DEFAULTS = { 'close_button_on_tab' : True, 'hide_tabbar' : False, 'scroll_tabbar' : False, + 'homogeneous_tabbar' : True, 'hide_from_taskbar' : False, 'always_on_top' : False, 'hide_on_lose_focus' : False, diff --git a/terminatorlib/notebook.py b/terminatorlib/notebook.py index bef0caf9..b2ef8f6f 100755 --- a/terminatorlib/notebook.py +++ b/terminatorlib/notebook.py @@ -45,7 +45,7 @@ class Notebook(Container, gtk.Notebook): # the new order of terminals. We probably need to preserve this for # navigation to next/prev terminals. #self.connect('page-reordered', self.on_page_reordered) - self.set_property('homogeneous', True) + self.set_property('homogeneous', self.config['homogeneous_tabbar']) self.set_scrollable(self.config['scroll_tabbar']) if self.config['tab_position'] == 'hidden' or self.config['hide_tabbar']: From 8c391e96d2abef882f3abc8d95ae340e435e14e9 Mon Sep 17 00:00:00 2001 From: "Francis Smit (Grizzly)" Date: Sun, 20 Nov 2011 23:09:54 +1100 Subject: [PATCH 2/3] have added configuration check boxex for scroll_tabbar and homogeneous_tabbar to the preferences dialog box, I'have tested it and it all works --- terminatorlib/preferences.glade | 120 ++++++++++++++++++++++++-------- terminatorlib/prefseditor.py | 16 +++++ 2 files changed, 107 insertions(+), 29 deletions(-) diff --git a/terminatorlib/preferences.glade b/terminatorlib/preferences.glade index 4ed38cc0..8d73bb32 100644 --- a/terminatorlib/preferences.glade +++ b/terminatorlib/preferences.glade @@ -382,7 +382,7 @@ True False - 13 + 15 2 6 @@ -591,8 +591,8 @@ Hide from taskbar - 7 - 8 + 9 + 10 @@ -610,8 +610,8 @@ 1 2 - 7 - 8 + 9 + 10 GTK_EXPAND @@ -623,8 +623,8 @@ Always on top - 8 - 9 + 10 + 11 @@ -636,8 +636,8 @@ Hide on lose focus - 9 - 10 + 11 + 12 @@ -655,8 +655,8 @@ 1 2 - 8 - 9 + 10 + 11 GTK_EXPAND @@ -674,8 +674,8 @@ 1 2 - 9 - 10 + 11 + 12 GTK_EXPAND @@ -687,8 +687,8 @@ Show on all workspaces - 10 - 11 + 12 + 13 @@ -706,8 +706,8 @@ 1 2 - 10 - 11 + 12 + 13 GTK_EXPAND @@ -719,8 +719,8 @@ DBus server - 6 - 7 + 8 + 9 @@ -736,8 +736,8 @@ 1 2 - 6 - 7 + 8 + 9 GTK_EXPAND GTK_EXPAND @@ -750,8 +750,8 @@ Hide size from title - 11 - 12 + 13 + 14 @@ -769,8 +769,8 @@ 1 2 - 11 - 12 + 13 + 14 GTK_EXPAND @@ -782,8 +782,8 @@ Unfocused terminal font brightness - 12 - 13 + 14 + 15 @@ -799,8 +799,70 @@ 1 2 - 12 - 13 + 14 + 15 + + + + + True + False + Tabs scroll buttons + + + 6 + 7 + + + + + True + True + False + False + 0 + 0.55000001192092896 + True + + + + 1 + 2 + 6 + 7 + GTK_EXPAND + GTK_EXPAND + + + + + True + False + Tabs homogeneous + + + 7 + 8 + + + + + True + True + False + False + 0 + True + True + + + + 1 + 2 + 7 + 8 + GTK_EXPAND + GTK_EXPAND diff --git a/terminatorlib/prefseditor.py b/terminatorlib/prefseditor.py index e1e48510..b0843a9e 100755 --- a/terminatorlib/prefseditor.py +++ b/terminatorlib/prefseditor.py @@ -215,6 +215,12 @@ class PrefsEditor: else: active = 0 widget.set_active(active) + # scroll_tabbar + widget = guiget('scrolltabbarcheck') + widget.set_active(self.config['scroll_tabbar']) + # homogeneous_tabbar + widget = guiget('homogeneouscheck') + widget.set_active(self.config['homogeneous_tabbar']) # DBus Server widget = guiget('dbuscheck') widget.set_active(self.config['dbus']) @@ -559,6 +565,16 @@ class PrefsEditor: self.config['geometry_hinting'] = widget.get_active() self.config.save() + def on_homogeneous_toggled(self, widget): + """homogeneous_tabbar setting changed""" + self.config['homogeneous_tabbar'] = widget.get_active() + self.config.save() + + def on_scroll_toggled(self, widget): + """scroll_tabbar setting changed""" + self.config['scroll_tabbar'] = widget.get_active() + self.config.save() + def on_dbuscheck_toggled(self, widget): """DBus server setting changed""" self.config['dbus'] = widget.get_active() From b0b8b576f6dad9c62e6e8fa3e841f251f6c60494 Mon Sep 17 00:00:00 2001 From: Stephen Boddy Date: Thu, 1 Aug 2013 17:30:18 +0200 Subject: [PATCH 3/3] A little adjustment to prevent messy tabs when tabs are not homogenous --- terminatorlib/preferences.glade | 19 ++++++++----------- terminatorlib/prefseditor.py | 7 +++++++ 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/terminatorlib/preferences.glade b/terminatorlib/preferences.glade index 8d73bb32..2ea00344 100644 --- a/terminatorlib/preferences.glade +++ b/terminatorlib/preferences.glade @@ -810,8 +810,8 @@ Tabs scroll buttons - 6 - 7 + 7 + 8 @@ -820,16 +820,14 @@ True False False - 0 - 0.55000001192092896 True 1 2 - 6 - 7 + 7 + 8 GTK_EXPAND GTK_EXPAND @@ -841,8 +839,8 @@ Tabs homogeneous - 7 - 8 + 6 + 7 @@ -851,7 +849,6 @@ True False False - 0 True True @@ -859,8 +856,8 @@ 1 2 - 7 - 8 + 6 + 7 GTK_EXPAND GTK_EXPAND diff --git a/terminatorlib/prefseditor.py b/terminatorlib/prefseditor.py index b0843a9e..9c1cf150 100755 --- a/terminatorlib/prefseditor.py +++ b/terminatorlib/prefseditor.py @@ -567,7 +567,14 @@ class PrefsEditor: def on_homogeneous_toggled(self, widget): """homogeneous_tabbar setting changed""" + guiget = self.builder.get_object self.config['homogeneous_tabbar'] = widget.get_active() + scroll_toggled = guiget('scrolltabbarcheck') + if widget.get_active(): + scroll_toggled.set_sensitive(True) + else: + scroll_toggled.set_active(True) + scroll_toggled.set_sensitive(False) self.config.save() def on_scroll_toggled(self, widget):