From 79ff1b93c96b8044754bd7a405ceae7fe04d585f Mon Sep 17 00:00:00 2001 From: clhodapp Date: Fri, 9 Oct 2009 14:08:31 -0500 Subject: [PATCH] Places: no height adjustment when auto The height adjustment box is insensitive when scrolling is disabled --- usr/lib/linuxmint/mintMenu/mintMenuConfig.glade | 2 +- usr/lib/linuxmint/mintMenu/mintMenuConfig.py | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/usr/lib/linuxmint/mintMenu/mintMenuConfig.glade b/usr/lib/linuxmint/mintMenu/mintMenuConfig.glade index b97c161..5799729 100644 --- a/usr/lib/linuxmint/mintMenu/mintMenuConfig.glade +++ b/usr/lib/linuxmint/mintMenu/mintMenuConfig.glade @@ -870,7 +870,7 @@ - + True True 5 diff --git a/usr/lib/linuxmint/mintMenu/mintMenuConfig.py b/usr/lib/linuxmint/mintMenu/mintMenuConfig.py index 5b3fef7..192b542 100755 --- a/usr/lib/linuxmint/mintMenu/mintMenuConfig.py +++ b/usr/lib/linuxmint/mintMenu/mintMenuConfig.py @@ -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", [ ] ) @@ -372,6 +375,12 @@ class mintMenuConfig( object ): self.updatePlacesGconf() 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()