From 18d293ef4ad8631c0a6cc4be6db72d55ae0c79ee Mon Sep 17 00:00:00 2001 From: Clement Lefebvre Date: Mon, 20 Jan 2014 14:56:17 +0000 Subject: [PATCH] Fixed applet background not following panel style --- usr/lib/linuxmint/mintMenu/mintMenu.py | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/usr/lib/linuxmint/mintMenu/mintMenu.py b/usr/lib/linuxmint/mintMenu/mintMenu.py index cbd2b60..0fd119e 100755 --- a/usr/lib/linuxmint/mintMenu/mintMenu.py +++ b/usr/lib/linuxmint/mintMenu/mintMenu.py @@ -530,8 +530,7 @@ class MenuWin( object ): self.applet.set_flags( MatePanelApplet.AppletFlags.EXPAND_MINOR ) self.applet.connect( "button-press-event", self.showMenu ) - self.applet.connect( "change-orient", self.changeOrientation ) - self.applet.connect( "change-background", self.changeBackground ) + self.applet.connect( "change-orient", self.changeOrientation ) self.applet.connect("enter-notify-event", self.enter_notify) self.applet.connect("leave-notify-event", self.leave_notify) self.mainwin = MainWindow( self.button_box, self.settings, self.keybinder ) @@ -606,6 +605,7 @@ class MenuWin( object ): self.sizeButton() self.applet.add( self.button_box ) + self.applet.set_background_widget( self.applet ) def loadSettings( self, *args, **kargs ): @@ -614,23 +614,7 @@ class MenuWin( object ): self.theme_name = self.settings.get_string( "theme-name" ) self.hotkeyText = self.settings.get_string( "hot-key" ) self.buttonIcon = self.settings.get_string( "applet-icon" ) - self.iconSize = self.settings.get_int( "applet-icon-size" ) - - def changeBackground( self, applet, type, color, pixmap ): - - self.applyTheme() - - # get reset style - self.applet.set_style(None) - rc_style = Gtk.RcStyle() - self.applet.modify_style(rc_style) - - if MatePanelApplet.AppletBackgroundType.COLOR_BACKGROUND == type: - applet.modify_bg( Gtk.StateType.NORMAL, color ) - elif MatePanelApplet.AppletBackgroundType.PIXMAP_BACKGROUND == type: - style = applet.style - style.bg_pixmap[ Gtk.StateType.NORMAL ] = pixmap - applet.set_style( style ) + self.iconSize = self.settings.get_int( "applet-icon-size" ) def changeTheme(self, *args): self.reloadSettings()