A little adjustment to prevent messy tabs when tabs are not homogenous

This commit is contained in:
Stephen Boddy 2013-08-01 17:30:18 +02:00
parent 8c391e96d2
commit b0b8b576f6
2 changed files with 15 additions and 11 deletions

View File

@ -810,8 +810,8 @@
<property name="label" translatable="yes">Tabs scroll buttons</property>
</object>
<packing>
<property name="top_attach">6</property>
<property name="bottom_attach">7</property>
<property name="top_attach">7</property>
<property name="bottom_attach">8</property>
</packing>
</child>
<child>
@ -820,16 +820,14 @@
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_action_appearance">False</property>
<property name="xalign">0</property>
<property name="yalign">0.55000001192092896</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">6</property>
<property name="bottom_attach">7</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>
@ -841,8 +839,8 @@
<property name="label" translatable="yes">Tabs homogeneous</property>
</object>
<packing>
<property name="top_attach">7</property>
<property name="bottom_attach">8</property>
<property name="top_attach">6</property>
<property name="bottom_attach">7</property>
</packing>
</child>
<child>
@ -851,7 +849,6 @@
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_action_appearance">False</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_homogeneous_toggled" swapped="no"/>
@ -859,8 +856,8 @@
<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="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>

View File

@ -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):