diff --git a/usr/lib/linuxmint/mintMenu/mintMenu.py b/usr/lib/linuxmint/mintMenu/mintMenu.py index 6be83fc..f5e8a92 100755 --- a/usr/lib/linuxmint/mintMenu/mintMenu.py +++ b/usr/lib/linuxmint/mintMenu/mintMenu.py @@ -609,17 +609,7 @@ class MenuWin( object ): self.theme_name = self.gconf.get( "string", "theme_name", "default" ) self.hotkeyText = self.gconf.get( "string", "hot_key", "Super_L" ) self.buttonIcon = self.gconf.get( "string", "applet_icon", ICON ) - self.setIconSize( self.gconf.get( "int", "applet_icon_size", 2 ) ) - - def setIconSize( self, icon_size): - if icon_size >= 4: - self.iconSize = gtk.ICON_SIZE_DIALOG - elif icon_size == 3: - self.iconSize = gtk.ICON_SIZE_DND - elif icon_size == 2: - self.iconSize = gtk.ICON_SIZE_BUTTON - else: - self.iconSize = gtk.ICON_SIZE_MENU + self.iconSize = self.gconf.get( "int", "applet_icon_size", 22 ) def changeBackground( self, applet, type, color, pixmap ): diff --git a/usr/lib/linuxmint/mintMenu/mintMenuConfig.glade b/usr/lib/linuxmint/mintMenu/mintMenuConfig.glade index 5cf80d9..0f9bada 100644 --- a/usr/lib/linuxmint/mintMenu/mintMenuConfig.glade +++ b/usr/lib/linuxmint/mintMenu/mintMenuConfig.glade @@ -30,7 +30,7 @@ True - 5 + 4 2 5 5 @@ -78,20 +78,6 @@ - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 - Icon Size: - - - 3 - 4 - GTK_FILL - - - True @@ -99,23 +85,6 @@ Button icon: - 4 - 5 - GTK_FILL - - - - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - 2 1 3 1 0 0 - - - 1 - 2 3 4 GTK_FILL @@ -180,8 +149,8 @@ 1 2 - 4 - 5 + 3 + 4 GTK_FILL @@ -415,168 +384,174 @@ 4 True - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 3 + 6 0 + 0 none - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 6 - 2 - 5 - True + 6 + 6 + 6 - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 - Icon size: + + + Use custom colors + True + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + True + + + False + 5 + 0 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 4 + 2 + 2 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + Headings: + + + GTK_FILL + GTK_FILL + 5 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + Borders: + + + 1 + 2 + GTK_FILL + GTK_FILL + 5 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + Background: + + + 2 + 3 + GTK_FILL + GTK_FILL + 5 + + + + + True + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + #000000000000 + + + 1 + 2 + 1 + 2 + GTK_FILL + GTK_FILL + + + + + True + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + #000000000000 + + + 1 + 2 + 2 + 3 + GTK_FILL + GTK_FILL + + + + + True + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + #000000000000 + + + 1 + 2 + GTK_FILL + GTK_FILL + + + + + True + 0 + Theme: + + + 3 + 4 + + + + + True + Default + + + 1 + 2 + 3 + 4 + + + + + False + 1 + + - - 4 - 5 - GTK_FILL - - - - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 1 1 4 1 0 0 - - - 1 - 2 - 4 - 5 - GTK_FILL - - 5 - - - - - Show category icons - True - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - True - - - 2 - 1 - 2 - GTK_FILL - - 5 - - - - - Show application comments - True - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - True - - - 2 - GTK_FILL - - 5 - - - - - Hover - True - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - True - - - 2 - 2 - 3 - GTK_FILL - - 5 - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 - Hover delay (seconds): - - - 3 - 4 - GTK_FILL - - - - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 100 0 1000 1 2 2 - - - 1 - 2 - 3 - 4 - GTK_FILL - - 5 - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 - Search command: - - - 5 - 6 - GTK_FILL - - - - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_STRUCTURE_MASK - - - 1 - 2 - 5 - 6 - - - 5 - - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True @@ -587,8 +562,6 @@ - False - 5 0 @@ -598,10 +571,10 @@ - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Applications + Colors 2 @@ -610,174 +583,171 @@ - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 6 + 3 0 - 0 none - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 6 - 6 - 6 + 6 + 2 + 5 + True - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - Use custom colors - True - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 - True - - - False - 5 - 0 - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 4 - 2 - 2 - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 - Headings: - - - GTK_FILL - GTK_FILL - 5 - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 - Borders: - - - 1 - 2 - GTK_FILL - GTK_FILL - 5 - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 - Background: - - - 2 - 3 - GTK_FILL - GTK_FILL - 5 - - - - - True - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - #000000000000 - - - 1 - 2 - 1 - 2 - GTK_FILL - GTK_FILL - - - - - True - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - #000000000000 - - - 1 - 2 - 2 - 3 - GTK_FILL - GTK_FILL - - - - - True - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - #000000000000 - - - 1 - 2 - GTK_FILL - GTK_FILL - - - - - True - 0 - Theme: - - - 3 - 4 - - - - - True - Default - - - 1 - 2 - 3 - 4 - - - - - False - 1 - - + 0 + Icon size: + + 4 + 5 + GTK_FILL + + + + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + 1 1 128 1 0 0 + + + 1 + 2 + 4 + 5 + GTK_FILL + + 5 + + + + + Show category icons + True + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + True + + + 2 + 1 + 2 + GTK_FILL + + 5 + + + + + Show application comments + True + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + True + + + 2 + GTK_FILL + + 5 + + + + + Hover + True + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + True + + + 2 + 2 + 3 + GTK_FILL + + 5 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + Hover delay (seconds): + + + 3 + 4 + GTK_FILL + + + + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + 100 0 1000 1 2 2 + + + 1 + 2 + 3 + 4 + GTK_FILL + + 5 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + Search command: + + + 5 + 6 + GTK_FILL + + + + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_STRUCTURE_MASK + + + + 1 + 2 + 5 + 6 + + + 5 + - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True @@ -792,10 +762,10 @@ - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Colors + Applications 3 @@ -866,7 +836,7 @@ True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 1 1 4 1 0 0 + 1 1 128 1 0 0 1 @@ -998,6 +968,42 @@ 1 + + + True + 3 + 4 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + Icon size: + + + False + 0 + + + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + 1 1 128 1 0 0 + + + False + False + 1 + + + + + 2 + + True @@ -1092,7 +1098,7 @@ False False - 2 + 3 @@ -1104,7 +1110,7 @@ True - 3 + 4 @@ -1269,7 +1275,7 @@ - 4 + 5 @@ -1373,6 +1379,45 @@ 1 + + + True + 4 + 4 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + Icon size: + + + False + False + 0 + + + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + 1 1 128 1 0 0 + + + False + False + 1 + + + + + False + False + 2 + + True @@ -1495,7 +1540,7 @@ False - 2 + 3 diff --git a/usr/lib/linuxmint/mintMenu/mintMenuConfig.py b/usr/lib/linuxmint/mintMenu/mintMenuConfig.py index e8a8e5d..38a3ec0 100755 --- a/usr/lib/linuxmint/mintMenu/mintMenuConfig.py +++ b/usr/lib/linuxmint/mintMenu/mintMenuConfig.py @@ -78,8 +78,9 @@ class mintMenuConfig( object ): #wTree.get_widget("favoritesLabel").set_text(_("Favorites")) wTree.get_widget("numberColumnsLabel").set_text(_("Number of columns:")) wTree.get_widget("iconSizeLabel").set_text(_("Icon size:")) - wTree.get_widget("iconSizeLabel2").set_text(_("Icon size:")) - wTree.get_widget("label44").set_text(_("Icon size:")) + wTree.get_widget("iconSizeLabel2").set_text(_("Icon size:")) + wTree.get_widget("placesIconSizeLabel").set_text(_("Icon size:")) + wTree.get_widget("systemIconSizeLabel").set_text(_("Icon size:")) wTree.get_widget("hoverLabel").set_text(_("Hover delay (ms):")) wTree.get_widget("label4").set_text(_("Button icon:")) wTree.get_widget("label5").set_text(_("Search command:")) @@ -123,10 +124,11 @@ class mintMenuConfig( object ): self.showPlacesPlugin = wTree.get_widget( "showPlacesPlugin" ) self.swapGeneric = wTree.get_widget("swapGeneric") self.hover = wTree.get_widget( "hover" ) - self.hoverDelay = wTree.get_widget( "hoverDelay" ) - self.bttniconSize = wTree.get_widget( "main_button_icon_size" ) + self.hoverDelay = wTree.get_widget( "hoverDelay" ) self.iconSize = wTree.get_widget( "iconSize" ) self.favIconSize = wTree.get_widget( "favIconSize" ) + self.placesIconSize = wTree.get_widget( "placesIconSize" ) + self.systemIconSize = wTree.get_widget( "systemIconSize" ) self.favCols = wTree.get_widget( "numFavCols" ) self.borderWidth = wTree.get_widget( "borderWidth" ) self.opacity = wTree.get_widget( "opacity" ) @@ -189,10 +191,12 @@ class mintMenuConfig( object ): self.bindGconfValueToWidget( self.gconfApplications, "bool", "swap_generic_name", self.swapGeneric, "toggled", self.swapGeneric.set_active, self.swapGeneric.get_active ) self.bindGconfValueToWidget( self.gconfApplications, "int", "category_hover_delay", self.hoverDelay, "value-changed", self.hoverDelay.set_value, self.hoverDelay.get_value ) - self.bindGconfValueToWidget( self.gconfApplications, "int", "icon_size", self.iconSize, "value-changed", self.iconSize.set_value, self.iconSize.get_value ) - self.bindGconfValueToWidget( self.gconf, "int", "applet_icon_size", self.bttniconSize, "value-changed", self.bttniconSize.set_value, self.bttniconSize.get_value ) + self.bindGconfValueToWidget( self.gconfApplications, "int", "icon_size", self.iconSize, "value-changed", self.iconSize.set_value, self.iconSize.get_value ) self.bindGconfValueToWidget( self.gconfApplications, "int", "favicon_size", self.favIconSize, "value-changed", self.favIconSize.set_value, self.favIconSize.get_value ) self.bindGconfValueToWidget( self.gconfApplications, "int", "fav_cols", self.favCols, "value-changed", self.favCols.set_value, self.favCols.get_value ) + + self.bindGconfValueToWidget( self.gconfPlaces, "int", "icon_size", self.placesIconSize, "value-changed", self.placesIconSize.set_value, self.placesIconSize.get_value ) + self.bindGconfValueToWidget( self.gconfSystem, "int", "icon_size", self.systemIconSize, "value-changed", self.systemIconSize.set_value, self.systemIconSize.get_value ) self.bindGconfValueToWidget( self.gconf, "int", "border_width", self.borderWidth, "value-changed", self.borderWidth.set_value, self.borderWidth.get_value_as_int ) self.bindGconfValueToWidget( self.gconf, "int", "opacity", self.opacity, "value-changed", self.opacity.set_value, self.opacity.get_value_as_int ) diff --git a/usr/lib/linuxmint/mintMenu/plugins/applications.py b/usr/lib/linuxmint/mintMenu/plugins/applications.py index e0ebf8d..8f8eab9 100755 --- a/usr/lib/linuxmint/mintMenu/plugins/applications.py +++ b/usr/lib/linuxmint/mintMenu/plugins/applications.py @@ -193,19 +193,7 @@ class SuggestionButton ( gtk.Button ): def set_image(self, path): self.image.set_from_file(path) - - def get_icon_size (self, iconSize): - if isinstance(iconSize, int): - if iconSize >= 4: - iconSize = gtk.ICON_SIZE_DIALOG - elif iconSize == 3: - iconSize = gtk.ICON_SIZE_DND - elif iconSize == 2: - iconSize = gtk.ICON_SIZE_BUTTON - elif iconSize == 1: - iconSize = gtk.ICON_SIZE_MENU - return iconSize - + def set_text( self, text): self.label.set_markup(text) @@ -331,21 +319,7 @@ class pluginclass( object ): # self.menuFileMonitors.append( filemonitor.addMonitor(f, self.onMenuChanged, mymenu.directory.Filename ) ) #for f in mymenu.directory.AppDirs: # self.menuFileMonitors.append( filemonitor.addMonitor(f, self.onMenuChanged, mymenu.directory.Filename ) ) - - sizeIcon = 0 - if isinstance(self.iconSize, int): - if self.iconSize >= 4: - sizeIcon = gtk.ICON_SIZE_DIALOG - elif self.iconSize == 3: - sizeIcon = gtk.ICON_SIZE_DND - elif self.iconSize == 2: - sizeIcon = gtk.ICON_SIZE_BUTTON - elif self.iconSize == 1: - sizeIcon = gtk.ICON_SIZE_MENU - elif self.iconSize <= 0: - return ( 0, 0 ) - - #sizeIcon = gtk.icon_size_lookup( sizeIcon ) + self.suggestions = [] self.current_suggestion = None self.get_panel() @@ -496,8 +470,8 @@ 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", 2 ) - self.faviconsize = self.gconf.get( "int", "favicon_size", 3 ) + self.iconSize = self.gconf.get( "int", "icon_size", 24 ) + 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 ) self.showcategoryicons = self.gconf.get( "bool", "show_category_icons", True ) diff --git a/usr/lib/linuxmint/mintMenu/plugins/easybuttons.py b/usr/lib/linuxmint/mintMenu/plugins/easybuttons.py index c664fbd..5712ccc 100755 --- a/usr/lib/linuxmint/mintMenu/plugins/easybuttons.py +++ b/usr/lib/linuxmint/mintMenu/plugins/easybuttons.py @@ -55,8 +55,8 @@ class IconManager(gobject.GObject): return None try: - [ iconWidth, iconHeight ] = self.getIconSize( iconSize ) - if iconWidth <= 0 or iconHeight <= 0: + #[ iconWidth, iconHeight ] = self.getIconSize( iconSize ) + if iconSize <= 0: return None if iconName in self.cache and iconSize in self.cache[iconName]: @@ -71,7 +71,7 @@ class IconManager(gobject.GObject): tmp = None for theme in self.themes: if theme.has_icon( realIconName ): - tmp = theme.lookup_icon( realIconName, iconWidth, 0 ) + tmp = theme.lookup_icon( realIconName, iconSize, 0 ) if tmp: break @@ -81,17 +81,17 @@ class IconManager(gobject.GObject): iconFileName = "" if iconFileName and os.path.exists( iconFileName ): - icon = gtk.gdk.pixbuf_new_from_file_at_size( iconFileName, iconWidth, iconHeight ) + icon = gtk.gdk.pixbuf_new_from_file_at_size( iconFileName, iconSize, iconSize ) else: icon = None # if the actual icon size is to far from the desired size resize it - if icon and (( icon.get_width() - iconWidth ) > 5 or ( icon.get_height() - iconHeight ) > 5): + if icon and (( icon.get_width() - iconSize ) > 5 or ( icon.get_height() - iconSize ) > 5): if icon.get_width() > icon.get_height(): - newIcon = icon.scale_simple( iconWidth, icon.get_height() * iconWidth / icon.get_width(), gtk.gdk.INTERP_BILINEAR ) + newIcon = icon.scale_simple( iconSize, icon.get_height() * iconSize / icon.get_width(), gtk.gdk.INTERP_BILINEAR ) else: - newIcon = icon.scale_simple( icon.get_width() * iconHeight / icon.get_height(), iconWidth, gtk.gdk.INTERP_BILINEAR ) + newIcon = icon.scale_simple( icon.get_width() * iconSize / icon.get_height(), iconSize, gtk.gdk.INTERP_BILINEAR ) del icon icon = newIcon @@ -105,21 +105,6 @@ class IconManager(gobject.GObject): print "Exception " + e.__class__.__name__ + ": " + e.message return None - def getIconSize( self, iconSize ): - if isinstance(iconSize, int): - if iconSize >= 4: - iconSize = gtk.ICON_SIZE_DIALOG - elif iconSize == 3: - iconSize = gtk.ICON_SIZE_DND - elif iconSize == 2: - iconSize = gtk.ICON_SIZE_BUTTON - elif iconSize == 1: - iconSize = gtk.ICON_SIZE_MENU - elif iconSize <= 0: - return ( 0, 0 ) - - return gtk.icon_size_lookup( iconSize ) - def themeChanged( self, theme ): self.cache = { } self.emit( "changed" ) @@ -149,8 +134,8 @@ class easyButton( gtk.Button ): self.buttonImage.set_from_pixbuf( icon ) del icon else: - [ iW, iH ] = iconManager.getIconSize( self.iconSize ) - self.buttonImage.set_size_request( iW, iH ) + #[ iW, iH ] = iconManager.getIconSize( self.iconSize ) + self.buttonImage.set_size_request( self.iconSize, self.iconSize ) self.buttonImage.show() HBox1.pack_start( self.buttonImage, False, False, 5 ) @@ -232,8 +217,8 @@ class easyButton( gtk.Button ): self.buttonImage.set_size_request( -1, -1 ) del icon else: - [iW, iH ] = iconManager.getIconSize( self.iconSize ) - self.buttonImage.set_size_request( iW, iH ) + #[iW, iH ] = iconManager.getIconSize( self.iconSize ) + self.buttonImage.set_size_request( self.iconSize, self.iconSize ) def setIconSize( self, size ): self.iconSize = size @@ -244,8 +229,8 @@ class easyButton( gtk.Button ): self.buttonImage.set_size_request( -1, -1 ) del icon elif self.iconSize: - [ iW, iH ] = iconManager.getIconSize( self.iconSize ) - self.buttonImage.set_size_request( iW, iH ) + #[ iW, iH ] = iconManager.getIconSize( self.iconSize ) + self.buttonImage.set_size_request( self.iconSize, self.iconSize ) class ApplicationLauncher( easyButton ): diff --git a/usr/lib/linuxmint/mintMenu/plugins/places.py b/usr/lib/linuxmint/mintMenu/plugins/places.py index 5d4d660..856f574 100755 --- a/usr/lib/linuxmint/mintMenu/plugins/places.py +++ b/usr/lib/linuxmint/mintMenu/plugins/places.py @@ -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", 2 ) + self.iconsize = self.gconf.get( "int","icon_size", 22 ) # Check default items diff --git a/usr/lib/linuxmint/mintMenu/plugins/system_management.py b/usr/lib/linuxmint/mintMenu/plugins/system_management.py index deff466..fe7c32b 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", 2 ) + self.iconsize = self.gconf.get( "int","icon_size", 22 ) # Check toggles