Merge non-homogenous tab feature from Grizzly Smit
This commit is contained in:
commit
031f754be4
|
@ -86,6 +86,7 @@ DEFAULTS = {
|
||||||
'close_button_on_tab' : True,
|
'close_button_on_tab' : True,
|
||||||
'hide_tabbar' : False,
|
'hide_tabbar' : False,
|
||||||
'scroll_tabbar' : False,
|
'scroll_tabbar' : False,
|
||||||
|
'homogeneous_tabbar' : True,
|
||||||
'hide_from_taskbar' : False,
|
'hide_from_taskbar' : False,
|
||||||
'always_on_top' : False,
|
'always_on_top' : False,
|
||||||
'hide_on_lose_focus' : False,
|
'hide_on_lose_focus' : False,
|
||||||
|
|
|
@ -45,7 +45,7 @@ class Notebook(Container, gtk.Notebook):
|
||||||
# the new order of terminals. We probably need to preserve this for
|
# the new order of terminals. We probably need to preserve this for
|
||||||
# navigation to next/prev terminals.
|
# navigation to next/prev terminals.
|
||||||
#self.connect('page-reordered', self.on_page_reordered)
|
#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'])
|
self.set_scrollable(self.config['scroll_tabbar'])
|
||||||
|
|
||||||
if self.config['tab_position'] == 'hidden' or self.config['hide_tabbar']:
|
if self.config['tab_position'] == 'hidden' or self.config['hide_tabbar']:
|
||||||
|
|
|
@ -391,7 +391,7 @@
|
||||||
<object class="GtkTable" id="global_config_table">
|
<object class="GtkTable" id="global_config_table">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="n_rows">16</property>
|
<property name="n_rows">18</property>
|
||||||
<property name="n_columns">2</property>
|
<property name="n_columns">2</property>
|
||||||
<property name="column_spacing">6</property>
|
<property name="column_spacing">6</property>
|
||||||
<child>
|
<child>
|
||||||
|
@ -600,8 +600,8 @@
|
||||||
<property name="label" translatable="yes">Hide from taskbar</property>
|
<property name="label" translatable="yes">Hide from taskbar</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="top_attach">7</property>
|
<property name="top_attach">9</property>
|
||||||
<property name="bottom_attach">8</property>
|
<property name="bottom_attach">10</property>
|
||||||
<property name="x_options"></property>
|
<property name="x_options"></property>
|
||||||
<property name="y_options"></property>
|
<property name="y_options"></property>
|
||||||
</packing>
|
</packing>
|
||||||
|
@ -619,8 +619,8 @@
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">1</property>
|
<property name="left_attach">1</property>
|
||||||
<property name="right_attach">2</property>
|
<property name="right_attach">2</property>
|
||||||
<property name="top_attach">7</property>
|
<property name="top_attach">9</property>
|
||||||
<property name="bottom_attach">8</property>
|
<property name="bottom_attach">10</property>
|
||||||
<property name="x_options"></property>
|
<property name="x_options"></property>
|
||||||
<property name="y_options">GTK_EXPAND</property>
|
<property name="y_options">GTK_EXPAND</property>
|
||||||
</packing>
|
</packing>
|
||||||
|
@ -632,8 +632,8 @@
|
||||||
<property name="label" translatable="yes">Always on top</property>
|
<property name="label" translatable="yes">Always on top</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="top_attach">8</property>
|
<property name="top_attach">10</property>
|
||||||
<property name="bottom_attach">9</property>
|
<property name="bottom_attach">11</property>
|
||||||
<property name="x_options"></property>
|
<property name="x_options"></property>
|
||||||
<property name="y_options"></property>
|
<property name="y_options"></property>
|
||||||
</packing>
|
</packing>
|
||||||
|
@ -645,8 +645,8 @@
|
||||||
<property name="label" translatable="yes">Hide on lose focus</property>
|
<property name="label" translatable="yes">Hide on lose focus</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="top_attach">9</property>
|
<property name="top_attach">11</property>
|
||||||
<property name="bottom_attach">10</property>
|
<property name="bottom_attach">12</property>
|
||||||
<property name="x_options"></property>
|
<property name="x_options"></property>
|
||||||
<property name="y_options"></property>
|
<property name="y_options"></property>
|
||||||
</packing>
|
</packing>
|
||||||
|
@ -664,8 +664,8 @@
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">1</property>
|
<property name="left_attach">1</property>
|
||||||
<property name="right_attach">2</property>
|
<property name="right_attach">2</property>
|
||||||
<property name="top_attach">8</property>
|
<property name="top_attach">10</property>
|
||||||
<property name="bottom_attach">9</property>
|
<property name="bottom_attach">11</property>
|
||||||
<property name="x_options"></property>
|
<property name="x_options"></property>
|
||||||
<property name="y_options">GTK_EXPAND</property>
|
<property name="y_options">GTK_EXPAND</property>
|
||||||
</packing>
|
</packing>
|
||||||
|
@ -683,8 +683,8 @@
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">1</property>
|
<property name="left_attach">1</property>
|
||||||
<property name="right_attach">2</property>
|
<property name="right_attach">2</property>
|
||||||
<property name="top_attach">9</property>
|
<property name="top_attach">11</property>
|
||||||
<property name="bottom_attach">10</property>
|
<property name="bottom_attach">12</property>
|
||||||
<property name="x_options"></property>
|
<property name="x_options"></property>
|
||||||
<property name="y_options">GTK_EXPAND</property>
|
<property name="y_options">GTK_EXPAND</property>
|
||||||
</packing>
|
</packing>
|
||||||
|
@ -696,8 +696,8 @@
|
||||||
<property name="label" translatable="yes">Show on all workspaces</property>
|
<property name="label" translatable="yes">Show on all workspaces</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="top_attach">10</property>
|
<property name="top_attach">12</property>
|
||||||
<property name="bottom_attach">11</property>
|
<property name="bottom_attach">13</property>
|
||||||
<property name="x_options"></property>
|
<property name="x_options"></property>
|
||||||
<property name="y_options"></property>
|
<property name="y_options"></property>
|
||||||
</packing>
|
</packing>
|
||||||
|
@ -715,8 +715,8 @@
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">1</property>
|
<property name="left_attach">1</property>
|
||||||
<property name="right_attach">2</property>
|
<property name="right_attach">2</property>
|
||||||
<property name="top_attach">10</property>
|
<property name="top_attach">12</property>
|
||||||
<property name="bottom_attach">11</property>
|
<property name="bottom_attach">13</property>
|
||||||
<property name="x_options"></property>
|
<property name="x_options"></property>
|
||||||
<property name="y_options">GTK_EXPAND</property>
|
<property name="y_options">GTK_EXPAND</property>
|
||||||
</packing>
|
</packing>
|
||||||
|
@ -728,8 +728,8 @@
|
||||||
<property name="label" translatable="yes">DBus server</property>
|
<property name="label" translatable="yes">DBus server</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="top_attach">6</property>
|
<property name="top_attach">8</property>
|
||||||
<property name="bottom_attach">7</property>
|
<property name="bottom_attach">9</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
|
@ -745,8 +745,8 @@
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">1</property>
|
<property name="left_attach">1</property>
|
||||||
<property name="right_attach">2</property>
|
<property name="right_attach">2</property>
|
||||||
<property name="top_attach">6</property>
|
<property name="top_attach">8</property>
|
||||||
<property name="bottom_attach">7</property>
|
<property name="bottom_attach">9</property>
|
||||||
<property name="x_options">GTK_EXPAND</property>
|
<property name="x_options">GTK_EXPAND</property>
|
||||||
<property name="y_options">GTK_EXPAND</property>
|
<property name="y_options">GTK_EXPAND</property>
|
||||||
</packing>
|
</packing>
|
||||||
|
@ -759,8 +759,8 @@
|
||||||
<property name="label" translatable="yes">Hide size from title</property>
|
<property name="label" translatable="yes">Hide size from title</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="top_attach">11</property>
|
<property name="top_attach">13</property>
|
||||||
<property name="bottom_attach">12</property>
|
<property name="bottom_attach">14</property>
|
||||||
<property name="x_options"></property>
|
<property name="x_options"></property>
|
||||||
<property name="y_options"></property>
|
<property name="y_options"></property>
|
||||||
</packing>
|
</packing>
|
||||||
|
@ -778,8 +778,8 @@
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">1</property>
|
<property name="left_attach">1</property>
|
||||||
<property name="right_attach">2</property>
|
<property name="right_attach">2</property>
|
||||||
<property name="top_attach">11</property>
|
<property name="top_attach">13</property>
|
||||||
<property name="bottom_attach">12</property>
|
<property name="bottom_attach">14</property>
|
||||||
<property name="x_options"></property>
|
<property name="x_options"></property>
|
||||||
<property name="y_options">GTK_EXPAND</property>
|
<property name="y_options">GTK_EXPAND</property>
|
||||||
</packing>
|
</packing>
|
||||||
|
@ -791,8 +791,8 @@
|
||||||
<property name="label" translatable="yes">Unfocused terminal font brightness</property>
|
<property name="label" translatable="yes">Unfocused terminal font brightness</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="top_attach">12</property>
|
<property name="top_attach">14</property>
|
||||||
<property name="bottom_attach">13</property>
|
<property name="bottom_attach">15</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
|
@ -808,8 +808,67 @@
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">1</property>
|
<property name="left_attach">1</property>
|
||||||
<property name="right_attach">2</property>
|
<property name="right_attach">2</property>
|
||||||
<property name="top_attach">12</property>
|
<property name="top_attach">14</property>
|
||||||
<property name="bottom_attach">13</property>
|
<property name="bottom_attach">15</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="label35">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Tabs scroll buttons</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="top_attach">7</property>
|
||||||
|
<property name="bottom_attach">8</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCheckButton" id="scrolltabbarcheck">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="receives_default">False</property>
|
||||||
|
<property name="use_action_appearance">False</property>
|
||||||
|
<property name="draw_indicator">True</property>
|
||||||
|
<signal name="toggled" handler="on_scroll_toggled" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">1</property>
|
||||||
|
<property name="right_attach">2</property>
|
||||||
|
<property name="top_attach">7</property>
|
||||||
|
<property name="bottom_attach">8</property>
|
||||||
|
<property name="x_options">GTK_EXPAND</property>
|
||||||
|
<property name="y_options">GTK_EXPAND</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="label37">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Tabs homogeneous</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="top_attach">6</property>
|
||||||
|
<property name="bottom_attach">7</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCheckButton" id="homogeneouscheck">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="receives_default">False</property>
|
||||||
|
<property name="use_action_appearance">False</property>
|
||||||
|
<property name="active">True</property>
|
||||||
|
<property name="draw_indicator">True</property>
|
||||||
|
<signal name="toggled" handler="on_homogeneous_toggled" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">1</property>
|
||||||
|
<property name="right_attach">2</property>
|
||||||
|
<property name="top_attach">6</property>
|
||||||
|
<property name="bottom_attach">7</property>
|
||||||
|
<property name="x_options">GTK_EXPAND</property>
|
||||||
|
<property name="y_options">GTK_EXPAND</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
|
@ -819,8 +878,8 @@
|
||||||
<property name="label" translatable="yes">Use custom URL handler</property>
|
<property name="label" translatable="yes">Use custom URL handler</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="top_attach">13</property>
|
<property name="top_attach">15</property>
|
||||||
<property name="bottom_attach">14</property>
|
<property name="bottom_attach">16</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
|
@ -830,8 +889,8 @@
|
||||||
<property name="label" translatable="yes">Custom URL handler</property>
|
<property name="label" translatable="yes">Custom URL handler</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="top_attach">14</property>
|
<property name="top_attach">16</property>
|
||||||
<property name="bottom_attach">15</property>
|
<property name="bottom_attach">17</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
|
@ -846,8 +905,8 @@
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">1</property>
|
<property name="left_attach">1</property>
|
||||||
<property name="right_attach">2</property>
|
<property name="right_attach">2</property>
|
||||||
<property name="top_attach">13</property>
|
<property name="top_attach">15</property>
|
||||||
<property name="bottom_attach">14</property>
|
<property name="bottom_attach">16</property>
|
||||||
<property name="x_options"></property>
|
<property name="x_options"></property>
|
||||||
<property name="y_options">GTK_EXPAND</property>
|
<property name="y_options">GTK_EXPAND</property>
|
||||||
</packing>
|
</packing>
|
||||||
|
@ -862,8 +921,8 @@
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">1</property>
|
<property name="left_attach">1</property>
|
||||||
<property name="right_attach">2</property>
|
<property name="right_attach">2</property>
|
||||||
<property name="top_attach">14</property>
|
<property name="top_attach">16</property>
|
||||||
<property name="bottom_attach">15</property>
|
<property name="bottom_attach">17</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
|
@ -873,8 +932,8 @@
|
||||||
<property name="label" translatable="yes">Re-use profiles for new terminals</property>
|
<property name="label" translatable="yes">Re-use profiles for new terminals</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="top_attach">15</property>
|
<property name="top_attach">17</property>
|
||||||
<property name="bottom_attach">16</property>
|
<property name="bottom_attach">18</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
|
@ -890,8 +949,8 @@
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">1</property>
|
<property name="left_attach">1</property>
|
||||||
<property name="right_attach">2</property>
|
<property name="right_attach">2</property>
|
||||||
<property name="top_attach">15</property>
|
<property name="top_attach">17</property>
|
||||||
<property name="bottom_attach">16</property>
|
<property name="bottom_attach">18</property>
|
||||||
<property name="x_options">GTK_EXPAND</property>
|
<property name="x_options">GTK_EXPAND</property>
|
||||||
<property name="y_options">GTK_EXPAND</property>
|
<property name="y_options">GTK_EXPAND</property>
|
||||||
</packing>
|
</packing>
|
||||||
|
|
|
@ -234,6 +234,12 @@ class PrefsEditor:
|
||||||
else:
|
else:
|
||||||
active = 0
|
active = 0
|
||||||
widget.set_active(active)
|
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
|
# DBus Server
|
||||||
widget = guiget('dbuscheck')
|
widget = guiget('dbuscheck')
|
||||||
widget.set_active(self.config['dbus'])
|
widget.set_active(self.config['dbus'])
|
||||||
|
@ -592,6 +598,23 @@ class PrefsEditor:
|
||||||
self.config['geometry_hinting'] = widget.get_active()
|
self.config['geometry_hinting'] = widget.get_active()
|
||||||
self.config.save()
|
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):
|
def on_dbuscheck_toggled(self, widget):
|
||||||
"""DBus server setting changed"""
|
"""DBus server setting changed"""
|
||||||
self.config['dbus'] = widget.get_active()
|
self.config['dbus'] = widget.get_active()
|
||||||
|
|
Loading…
Reference in New Issue