gtk.Button.set_image not available on

pygtk < 2.6
This commit is contained in:
Dimitur Kirov 2005-08-10 21:49:51 +00:00
parent 6dc0759243
commit 80fc80b62c
1 changed files with 6 additions and 3 deletions

View File

@ -1607,6 +1607,7 @@ class FileTransfersWindow:
self.continue_menuitem = popup_xml.get_widget('continue_menuitem')
self.remove_menuitem = popup_xml.get_widget('remove_menuitem')
self.clean_up_menuitem = popup_xml.get_widget('clean_up_menuitem')
if gtk.gtk_version >= (2, 6, 0) and gtk.pygtk_version >= (2, 6, 0):
self.pause_button.set_image(gtk.image_new_from_stock(
gtk.STOCK_MEDIA_PAUSE, gtk.ICON_SIZE_MENU))
popup_xml.signal_autoconnect(self)
@ -1980,6 +1981,7 @@ _('Connection with peer cannot be established.')).get_response()
if status:
label = _('Pause')
self.pause_button.set_label(label)
if gtk.gtk_version >= (2, 6, 0) and gtk.pygtk_version >= (2, 6, 0):
self.pause_button.set_image(gtk.image_new_from_stock(
gtk.STOCK_MEDIA_PAUSE, gtk.ICON_SIZE_MENU))
@ -1991,6 +1993,7 @@ _('Connection with peer cannot be established.')).get_response()
else:
label = _('_Continue')
self.pause_button.set_label(label)
if gtk.gtk_version >= (2, 6, 0) and gtk.pygtk_version >= (2, 6, 0):
self.pause_button.set_image(gtk.image_new_from_stock(
gtk.STOCK_MEDIA_PLAY, gtk.ICON_SIZE_MENU))
self.pause_menuitem.hide()