Fix icon name encoding error when converting to ctypes

This commit is contained in:
Michael Webster 2013-05-11 13:43:18 -04:00
parent a0bbbe1bd3
commit 7727fa6e8a

View File

@ -285,7 +285,7 @@ class ApplicationLauncher( easyButton ):
del icon del icon
else: else:
if self.iconName: if self.iconName:
c = c_char_p(self.iconName) c = c_char_p(self.iconName.encode('ascii', 'ignore'))
gtk.gtk_drag_source_set_icon_name( hash(self), c) gtk.gtk_drag_source_set_icon_name( hash(self), c)
self.connectSelf( "focus-in-event", self.onFocusIn ) self.connectSelf( "focus-in-event", self.onFocusIn )
@ -408,7 +408,7 @@ class ApplicationLauncher( easyButton ):
del icon del icon
else: else:
if self.iconName: if self.iconName:
c = c_char_p(self.iconName) c = c_char_p(self.iconName.encode('ascii', 'ignore'))
gtk.gtk_drag_source_set_icon_name( hash(self), c) gtk.gtk_drag_source_set_icon_name( hash(self), c)
def startupFileChanged( self, *args ): def startupFileChanged( self, *args ):