def switchButton(self): # Change the "Stop" button to a "Dismiss" button debug.mainthreadTest() if not self.dismissable: label = gtkutils.findChild(gtk.Label, self.stopbutton) label.set_text("Dismiss") image = gtkutils.findChild(gtk.Image, self.stopbutton) image.set_from_stock(gtk.STOCK_CANCEL, gtk.ICON_SIZE_BUTTON) self.dismissable = True activityViewer.sensitize()
def disconnect(self): debug.mainthreadTest() # Called by the ActivityViewer when it closes and by Progress # objects when they're finished or destroyed, via the # mechanism in progressGUI.C. self._disconnect() if activityviewermenu.autoDismiss: self._destroy() else: self.switchButton() activityViewer.sensitize()