From 471519d43b3703a7d09063aa0f02d5fa990cc2b0 Mon Sep 17 00:00:00 2001 From: Michael Webster Date: Wed, 8 May 2013 09:05:09 -0400 Subject: [PATCH] restore drag source icons --- .../linuxmint/mintMenu/plugins/easybuttons.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/usr/lib/linuxmint/mintMenu/plugins/easybuttons.py b/usr/lib/linuxmint/mintMenu/plugins/easybuttons.py index 99c1f36..a424371 100755 --- a/usr/lib/linuxmint/mintMenu/plugins/easybuttons.py +++ b/usr/lib/linuxmint/mintMenu/plugins/easybuttons.py @@ -256,10 +256,11 @@ class ApplicationLauncher( easyButton ): targets = array(( "text/plain", 0, 100 ), ( "text/uri-list", 0, 101 )) gtk.gtk_drag_source_set(hash(self), Gdk.ModifierType.BUTTON1_MASK, targets, 2, Gdk.DragAction.COPY) - # icon = self.getIcon( Gtk.IconSize.DND ) - # if icon: - # gtk.gtk_drag_source_set_icon_pixbuf( hash(self), hash(icon) ) - # del icon + icon = self.getIcon( Gtk.IconSize.DND ) + if icon and icon.get_storage_type() == Gtk.ImageType.PIXBUF: + pb = icon.get_pixbuf() + gtk.gtk_drag_source_set_icon_pixbuf( hash(self), hash(pb) ) + del icon self.connectSelf( "focus-in-event", self.onFocusIn ) self.connectSelf( "focus-out-event", self.onFocusOut ) @@ -373,10 +374,11 @@ class ApplicationLauncher( easyButton ): def iconChanged( self ): easyButton.iconChanged( self ) - # icon = self.getIcon( Gtk.IconSize.DND ) - # if icon: - # gtk.gtk_drag_source_set_icon_pixbuf( hash(self), hash(icon) ) - # del icon + icon = self.getIcon( Gtk.IconSize.DND ) + if icon and icon.get_storage_type() == Gtk.ImageType.PIXBUF: + pb = icon.get_pixbuf() + gtk.gtk_drag_source_set_icon_pixbuf( hash(self), hash(pb) ) + del icon def startupFileChanged( self, *args ): self.inStartup = os.path.exists( self.startupFilePath )