diff --git a/terminatorlib/config.py b/terminatorlib/config.py index 6246a024..ec581bc4 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 d08d3c89..7af94c25 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']: diff --git a/terminatorlib/preferences.glade b/terminatorlib/preferences.glade index 8ea910d6..4db13347 100644 --- a/terminatorlib/preferences.glade +++ b/terminatorlib/preferences.glade @@ -391,7 +391,7 @@ True False - 16 + 18 2 6 @@ -600,8 +600,8 @@ Hide from taskbar - 7 - 8 + 9 + 10 @@ -619,8 +619,8 @@ 1 2 - 7 - 8 + 9 + 10 GTK_EXPAND @@ -632,8 +632,8 @@ Always on top - 8 - 9 + 10 + 11 @@ -645,8 +645,8 @@ Hide on lose focus - 9 - 10 + 11 + 12 @@ -664,8 +664,8 @@ 1 2 - 8 - 9 + 10 + 11 GTK_EXPAND @@ -683,8 +683,8 @@ 1 2 - 9 - 10 + 11 + 12 GTK_EXPAND @@ -696,8 +696,8 @@ Show on all workspaces - 10 - 11 + 12 + 13 @@ -715,8 +715,8 @@ 1 2 - 10 - 11 + 12 + 13 GTK_EXPAND @@ -728,8 +728,8 @@ DBus server - 6 - 7 + 8 + 9 @@ -745,8 +745,8 @@ 1 2 - 6 - 7 + 8 + 9 GTK_EXPAND GTK_EXPAND @@ -759,8 +759,8 @@ Hide size from title - 11 - 12 + 13 + 14 @@ -778,8 +778,8 @@ 1 2 - 11 - 12 + 13 + 14 GTK_EXPAND @@ -791,8 +791,8 @@ Unfocused terminal font brightness - 12 - 13 + 14 + 15 @@ -808,8 +808,67 @@ 1 2 - 12 - 13 + 14 + 15 + + + + + True + False + Tabs scroll buttons + + + 7 + 8 + + + + + True + True + False + False + True + + + + 1 + 2 + 7 + 8 + GTK_EXPAND + GTK_EXPAND + + + + + True + False + Tabs homogeneous + + + 6 + 7 + + + + + True + True + False + False + True + True + + + + 1 + 2 + 6 + 7 + GTK_EXPAND + GTK_EXPAND @@ -819,8 +878,8 @@ Use custom URL handler - 13 - 14 + 15 + 16 @@ -830,8 +889,8 @@ Custom URL handler - 14 - 15 + 16 + 17 @@ -846,8 +905,8 @@ 1 2 - 13 - 14 + 15 + 16 GTK_EXPAND @@ -862,8 +921,8 @@ 1 2 - 14 - 15 + 16 + 17 @@ -873,8 +932,8 @@ Re-use profiles for new terminals - 15 - 16 + 17 + 18 @@ -890,8 +949,8 @@ 1 2 - 15 - 16 + 17 + 18 GTK_EXPAND GTK_EXPAND diff --git a/terminatorlib/prefseditor.py b/terminatorlib/prefseditor.py index fddcc4b4..6c0a9890 100755 --- a/terminatorlib/prefseditor.py +++ b/terminatorlib/prefseditor.py @@ -234,6 +234,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']) @@ -592,6 +598,23 @@ class PrefsEditor: self.config['geometry_hinting'] = widget.get_active() self.config.save() + 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): + """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()