def run(self): # # Main text # text = ( 'Thank you for reporting your bugs, it helps us improve our' ' scanning engine. If you want to get involved with the project' ' please send an email to our <a href="mailto:%s">mailing list' ' </a>.') text %= '*****@*****.**' # All these lines are here to add a label instead of the easy "set_ # markup" in order to avoid a bug where the label text appears selected msg_area = self.get_message_area() [msg_area.remove(c) for c in msg_area.get_children()] label = gtk.Label() label.set_markup(text) label.set_line_wrap(True) label.select_region(0, 0) msg_area.pack_start(label) self.worker = bug_report_worker(self.bug_report_function, self.bugs_to_report) self.worker.start() gobject.timeout_add(200, self.add_result_from_worker) self.status_hbox = gtk.HBox() # # Empty markup for the ticket ids # self.link_label = gtk.Label('') self.link_label.set_line_wrap(True) self.link_label.set_use_markup(True) self.status_hbox.pack_end(self.link_label) # # Throbber, only show while still running. # self.throbber = Throbber() self.throbber.running(True) self.status_hbox.pack_end(self.throbber) # # Check, hidden at the beginning # http://www.pygtk.org/docs/pygtk/gtk-stock-items.html # self.done_icon = gtk.Image() self.done_icon.set_from_stock(gtk.STOCK_YES, gtk.ICON_SIZE_BUTTON) self.status_hbox.pack_end(self.done_icon) self.vbox.pack_start(self.status_hbox, True, True) self.add(self.vbox) self.show_all() self.done_icon.hide() super(report_bug_show_result, self).run() self.destroy() return self.reported_ids