I personally would prefer to do something like this:
button = gtk.Button(_("_Remove Packages")) image = gtk.image_new_from_stock(gtk.STOCK_CANCEL, gtk.ICON_SIZE_BUTTON) button.set_image(image) dialog.add_action_widget(button, gtk.RESPONSE_CANCEL)
Just my personal preference though.
I personally would prefer to do something like this:
button = gtk.Button( _("_Remove Packages")) new_from_ stock(gtk. STOCK_CANCEL, gtk.ICON_ SIZE_BUTTON) set_image( image) add_action_ widget( button, gtk.RESPONSE_ CANCEL)
image = gtk.image_
button.
dialog.
Just my personal preference though.