Places: no height adjustment when auto

The height adjustment box is insensitive when scrolling is disabled
This commit is contained in:
clhodapp 2009-10-09 14:08:31 -05:00
parent d3a96e305e
commit 79ff1b93c9
2 changed files with 12 additions and 3 deletions

View File

@ -870,7 +870,7 @@
</packing>
</child>
<child>
<widget class="GtkSpinButton" id="placesHeightSpinBox">
<widget class="GtkSpinButton" id="placesHeightSpinButton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="max_length">5</property>

View File

@ -123,7 +123,10 @@ class mintMenuConfig( object ):
self.trashtoggle = wTree.get_widget( "trashcheckbutton" )
self.customplacestree = wTree.get_widget( "customplacestree" )
self.allowScrollbarToggle = wTree.get_widget( "allowscrollbarcheckbutton" )
self.placesHeightBox = wTree.get_widget( "placesHeightSpinBox" )
self.placesHeightButton = wTree.get_widget( "placesHeightSpinButton" )
if (self.allowScrollbarToggle.get_active() == False):
self.placesHeightButton.set_sensitive(False)
self.allowScrollbarToggle.connect("toggled", self.toggleHeightEnabled )
wTree.get_widget( "closeButton" ).connect("clicked", gtk.main_quit )
@ -164,7 +167,7 @@ class mintMenuConfig( object ):
self.bindGconfValueToWidget( self.gconfPlaces, "bool", "show_network", self.networktoggle, "toggled", self.networktoggle.set_active, self.networktoggle.get_active )
self.bindGconfValueToWidget( self.gconfPlaces, "bool", "show_desktop", self.desktoptoggle, "toggled", self.desktoptoggle.set_active, self.desktoptoggle.get_active )
self.bindGconfValueToWidget( self.gconfPlaces, "bool", "show_trash", self.trashtoggle, "toggled", self.trashtoggle.set_active, self.trashtoggle.get_active )
self.bindGconfValueToWidget( self.gconfPlaces, "int", "height", self.placesHeightBox, "value-changed", self.placesHeightBox.set_value, self.placesHeightBox.get_value_as_int )
self.bindGconfValueToWidget( self.gconfPlaces, "int", "height", self.placesHeightButton, "value-changed", self.placesHeightButton.set_value, self.placesHeightButton.get_value_as_int )
self.bindGconfValueToWidget( self.gconfPlaces, "bool", "allowScrollbar", self.allowScrollbarToggle, "toggled", self.allowScrollbarToggle.set_active, self.allowScrollbarToggle.get_active )
self.customplacenames = self.gconfPlaces.get( "list-string", "custom_names", [ ] )
@ -373,6 +376,12 @@ class mintMenuConfig( object ):
return
def toggleHeightEnabled(self, toggle):
if (toggle.get_active() == True):
self.placesHeightButton.set_sensitive(True)
else:
self.placesHeightButton.set_sensitive(False)
def updatePlacesGconf(self):
treeiter = self.customplacestreemodel.get_iter_first()
customplacenames = [ ]