From 95063d3124913d2e5d30db604e00e56b18762ba8 Mon Sep 17 00:00:00 2001 From: Clement Lefebvre Date: Thu, 23 Sep 2010 18:27:04 +0100 Subject: [PATCH] Better defaults, fix bugs with icon size --- usr/lib/linuxmint/mintMenu/plugins/applications.py | 8 +++----- usr/lib/linuxmint/mintMenu/plugins/places.py | 6 +++--- usr/lib/linuxmint/mintMenu/plugins/system_management.py | 6 +++--- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/usr/lib/linuxmint/mintMenu/plugins/applications.py b/usr/lib/linuxmint/mintMenu/plugins/applications.py index 5919a58..85abe02 100755 --- a/usr/lib/linuxmint/mintMenu/plugins/applications.py +++ b/usr/lib/linuxmint/mintMenu/plugins/applications.py @@ -166,8 +166,7 @@ class Menu: class SuggestionButton ( gtk.Button ): def __init__( self, iconName, iconSize, label ): - gtk.Button.__init__( self ) - iconSize = self.get_icon_size(iconSize) + gtk.Button.__init__( self ) self.iconName = iconName self.set_relief( gtk.RELIEF_NONE ) self.set_size_request( -1, -1 ) @@ -197,8 +196,7 @@ class SuggestionButton ( gtk.Button ): def set_text( self, text): self.label.set_markup(text) - def set_icon_size (self, size): - size = self.get_icon_size(size) + def set_icon_size (self, size): self.image.set_from_stock( self.iconName, size ) class pluginclass( object ): @@ -470,7 +468,7 @@ class pluginclass( object ): self.width = self.gconf.get( "int", "width", 480 ) self.height = self.gconf.get( "int", "height", 410 ) self.donotfilterapps = self.gconf.get( "bool", "do_not_filter", False ) - self.iconSize = self.gconf.get( "int", "icon_size", 24 ) + self.iconSize = self.gconf.get( "int", "icon_size", 22 ) self.faviconsize = self.gconf.get( "int", "favicon_size", 48 ) self.favCols = self.gconf.get( "int", "fav_cols", 2 ) self.swapgeneric = self.gconf.get( "bool", "swap_generic_name", False ) diff --git a/usr/lib/linuxmint/mintMenu/plugins/places.py b/usr/lib/linuxmint/mintMenu/plugins/places.py index 856f574..00369f7 100755 --- a/usr/lib/linuxmint/mintMenu/plugins/places.py +++ b/usr/lib/linuxmint/mintMenu/plugins/places.py @@ -99,7 +99,7 @@ class pluginclass( object ): def GetGconfEntries( self ): self.width = self.gconf.get( "int", "width", 200 ) - self.allowScrollbar = self.gconf.get( "bool", "allowScrollbar", True) + self.allowScrollbar = self.gconf.get( "bool", "allowScrollbar", False) self.showGTKBookmarks = self.gconf.get( "bool", "show_gtk_bookmarks", False) self.scrolledWindow.set_policy( gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC ) self.height = self.gconf.get( "int", "height", 180 ) @@ -109,7 +109,7 @@ class pluginclass( object ): self.scrolledWindow.set_policy( gtk.POLICY_AUTOMATIC, gtk.POLICY_NEVER ) self.content_holder.set_size_request( self.width, self.height ) self.execapp = self.gconf.get( "string", "execute_app", "nautilus" ) - self.iconsize = self.gconf.get( "int","icon_size", 22 ) + self.iconsize = self.gconf.get( "int","icon_size", 16 ) # Check default items @@ -159,7 +159,7 @@ class pluginclass( object ): self.mintMenuWin.setTooltip( Button2, _("Open your personal folder") ) if ( self.shownetwork == True ): - Button3 = easyButton( "network-workgroup", self.iconsize, [_("Network")], -1, -1 ) + Button3 = easyButton( "notification-network-ethernet-connected", self.iconsize, [_("Network")], -1, -1 ) Button3.connect( "clicked", self.ButtonClicked, "nautilus network:" ) Button3.show() self.placesBtnHolder.pack_start( Button3, False, False ) diff --git a/usr/lib/linuxmint/mintMenu/plugins/system_management.py b/usr/lib/linuxmint/mintMenu/plugins/system_management.py index fe7c32b..3247125 100755 --- a/usr/lib/linuxmint/mintMenu/plugins/system_management.py +++ b/usr/lib/linuxmint/mintMenu/plugins/system_management.py @@ -100,7 +100,7 @@ class pluginclass( object ): self.height = -1 self.scrolledWindow.set_policy( gtk.POLICY_AUTOMATIC, gtk.POLICY_NEVER ) self.content_holder.set_size_request( self.width, self.height ) - self.iconsize = self.gconf.get( "int","icon_size", 22 ) + self.iconsize = self.gconf.get( "int","icon_size", 16 ) # Check toggles @@ -131,14 +131,14 @@ class pluginclass( object ): if ( self.showSoftwareManager == True ): if os.path.exists("/usr/lib/linuxmint/mintInstall/icon.svg"): - Button1 = easyButton( "/usr/lib/linuxmint/mintInstall/icon.svg", self.iconsize, [_("Software Manager")], -1, -1 ) + Button1 = easyButton( "applications-other", self.iconsize, [_("Software Manager")], -1, -1 ) Button1.connect( "clicked", self.ButtonClicked, "mintinstall" ) Button1.show() self.systemBtnHolder.pack_start( Button1, False, False ) self.mintMenuWin.setTooltip( Button1, _("Browse and install available software") ) if ( self.showPackageManager == True ): - Button2 = easyButton( "synaptic", self.iconsize, [_("Package Manager")], -1, -1 ) + Button2 = easyButton( "applications-system", self.iconsize, [_("Package Manager")], -1, -1 ) Button2.connect( "clicked", self.ButtonClicked, "gksu /usr/sbin/synaptic" ) Button2.show() self.systemBtnHolder.pack_start( Button2, False, False )