From aaef795ec54af482bcae7c7c4a8502703710dc9d Mon Sep 17 00:00:00 2001 From: Clement Lefebvre Date: Thu, 19 Nov 2009 09:23:02 +0000 Subject: [PATCH] Use pygtk to brighten image when menu is hovered --- debian/changelog | 1 + usr/lib/linuxmint/mintMenu/mintMenu.py | 10 +++++----- usr/lib/linuxmint/mintMenu/mintMenu_hover.png | Bin 1118 -> 0 bytes 3 files changed, 6 insertions(+), 5 deletions(-) delete mode 100644 usr/lib/linuxmint/mintMenu/mintMenu_hover.png diff --git a/debian/changelog b/debian/changelog index 94373eb..4d89ce4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ mintmenu (4.8.7) helena; urgency=low * Replaced xdg with gmenu (Fixes broken Games category) * Removed calls to mouse grabs (Could fix weird bug about not being able to grab the mouse) * Made Pidgin a favorite in replacement of Xchat + * Hover menu icon now uses pygtk to brighten the chosen picture: Fixes problem with custom menu icons -- Clement Lefebvre Thu, 19 Nov 2009 08:52:00 +0000 diff --git a/usr/lib/linuxmint/mintMenu/mintMenu.py b/usr/lib/linuxmint/mintMenu/mintMenu.py index 67af12b..e7127ab 100755 --- a/usr/lib/linuxmint/mintMenu/mintMenu.py +++ b/usr/lib/linuxmint/mintMenu/mintMenu.py @@ -44,7 +44,6 @@ gettext.install("mintmenu", "/usr/share/linuxmint/locale") NAME = _("Menu") PATH = os.path.abspath( os.path.dirname( sys.argv[0] ) ) ICON = "/usr/lib/linuxmint/mintMenu/mintMenu.png" -ICON_HOVER = "/usr/lib/linuxmint/mintMenu/mintMenu_hover.png" sys.path.append( os.path.join( PATH , "plugins") ) @@ -602,13 +601,15 @@ class MenuWin( object ): print cause def enter_notify(self, applet, event): - self.do_image(self.buttonIcon_hover) + self.do_image(self.buttonIcon, True) def leave_notify(self, applet, event): - self.do_image(self.buttonIcon) + self.do_image(self.buttonIcon, False) - def do_image(self, image_file): + def do_image(self, image_file, saturate): pixbuf = gtk.gdk.pixbuf_new_from_file(image_file) + if saturate: + gtk.gdk.Pixbuf.saturate_and_pixelate(pixbuf, pixbuf, 1.5, False) self.button_icon.set_from_pixbuf(pixbuf) def createPanelButton( self ): @@ -655,7 +656,6 @@ class MenuWin( object ): self.buttonText = self.gconf.get( "string", "applet_text", "Menu" ) self.hotkeyText = self.gconf.get( "string", "hot_key", "Super_L" ) self.buttonIcon = self.gconf.get( "string", "applet_icon", ICON ) - self.buttonIcon_hover = self.gconf.get( "string", "applet_icon_hover", ICON_HOVER ) self.setIconSize( self.gconf.get( "int", "applet_icon_size", 2 ) ) def setIconSize( self, icon_size): diff --git a/usr/lib/linuxmint/mintMenu/mintMenu_hover.png b/usr/lib/linuxmint/mintMenu/mintMenu_hover.png deleted file mode 100644 index 5c929b770358618f496756b932b94efbc3f7aa5f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1118 zcmV-k1flzhP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01ejw01ejxLMWSf00007bV*G`2iXe- z4GkbIMnqfy00Z7hL_t(I%XO7sh*VV^$3OSZotfR)ojbBR<>q96hzi#v6Lb?rlne@j zU?C_l^q~!UFeG|1f?j$Mln@Jg5vhm5$_jc(Gm7@fK>QO(TCIz_th>(W?9QKi?>Xmp zP7il>+Sc_4zso)6p5OO;`SSh!uIHTl9as%mz%9z9>%|Gs2Bv^tfK$K?&+}~O8=iCS z22jz=usAH~8P~zF-DkR!A)tp6Pyna_hmA4Eve|5-3mh|98RJN&$f8jgtI(n_qEM1x zWMQ44v_hOFu)S1zH?m{pTdZQ80H0T@)&1pix#2G`bO?f=QTSwe#NR>4gD4weBtc7r zT1XcWOPjiy;=-M8`Q-1Hxg39;0rm_G3>+968_W2B7tl{B8NxJrUA^8wT6v!0bq3i) zl4z7Dj2J`=A{G&i5rsI1h)_>v_;UOJGwyQ6_x=507_JQf7qEiO`B7}X!8fz-5~&3G zz$inj*+MXESn(oTi+l0Oa-sD-#wKhmjvy$`OdsXvnPZ%uI?SHRiItT~<%K|N{Z14` z{b3jm`xM_OW(S#zrvVTvD6M!b+{$ys_qw7D_l zC=?dKVpID$#d5J2*a3((Xx)**I~(jrcy#dOO3djhA$PB2E&n?z7X zbE`GMs-6jyiBKd=H?NS(^r0j|tPoSBZSHjYb6LiSMM=sy1fu_PHGa1M~*{h|@H573(y9Cats>nkGg($o9aR zQkg?fj}y1OQ~nZD`~kcfP@I1InUjoe`INP#ArjMKE}lh1rBl!f)(JiyVXl{fTrY#U zHM~@LAD_Ov8FyHFzy{z$U^kF;#0a`O^u1*pA`j%#UrW1vYPmDiYBj5O?F>J5&!@I07*qoM6N<$f(p0^+yDRo