def runAndDismiss(self, d, time=1): def dismiss(): d.response(gtk.RESPONSE_ACCEPT) d.hide() return False # increase timeout to see what dialogs look like utils.timeout_add(10 * time, dismiss) r = d.run() d.destroy()
def runAndDismiss(self,d, time=1): def dismiss(): d.response(gtk.RESPONSE_ACCEPT) d.hide() return False # increase timeout to see what dialogs look like utils.timeout_add(10 * time,dismiss) r = d.run() d.destroy()
def do(self, d): if timeout > 0: def dismiss(): d.response(gtk.RESPONSE_ACCEPT) return False utils.timeout_add(timeout, dismiss) response = d.run() d.destroy() return response