[Reportbug-commits] [SCM] Reportbug - reports bugs in the Debian distribution branch, master, updated. 4.2-4-g6fc8e5c
Luca Bruno
lethalman88 at gmail.com
Fri May 8 16:01:47 UTC 2009
The following commit has been merged in the master branch:
commit 6dc99fd38c00e6332dd5e132faf8e1a9f91eaa83
Author: Luca Bruno <lethalman88 at gmail.com>
Date: Mon May 4 23:34:50 2009 +0200
- implement show_report(). Thanks to James Vega for the report;
Closes: 525762
diff --git a/debian/changelog b/debian/changelog
index 51555ef..93c6d3a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,8 +3,10 @@ reportbug (4.3) UNRELEASED; urgency=low
* reportbug/ui/gtk2_ui.py:
- fix crash when showing menu options
- make the textbox containing error information wider
+ - implement show_report(). Thanks to James Vega for the report;
+ Closes: 525762
- -- Luca Bruno <lethalman88 at gmail.com> Thu, 07 May 2009 21:38:45 +0200
+ -- Luca Bruno <lethalman88 at gmail.com> Mon, 04 May 2009 23:32:56 +0200
reportbug (4.2) unstable; urgency=low
diff --git a/reportbug/ui/gtk2_ui.py b/reportbug/ui/gtk2_ui.py
index 9dbf499..4db09e3 100644
--- a/reportbug/ui/gtk2_ui.py
+++ b/reportbug/ui/gtk2_ui.py
@@ -313,13 +313,13 @@ class BugReport (object):
# BTS GUI
class BugPage (gtk.EventBox, threading.Thread):
- def __init__ (self, dialog, number, queryonly, bts, mirrors, http_proxy, archived):
+ def __init__ (self, assistant, dialog, number, queryonly, bts, mirrors, http_proxy, archived):
threading.Thread.__init__ (self)
gtk.EventBox.__init__ (self)
self.setDaemon (True)
self.dialog = dialog
- self.assistant = self.dialog.assistant
+ self.assistant = assistant
self.application = self.assistant.application
self.number = number
self.queryonly = queryonly
@@ -407,6 +407,7 @@ class BugPage (gtk.EventBox, threading.Thread):
# Forward the assistant to the progress bar
self.assistant.forward_page ()
# Though we're only a page, we are authorized to destroy our parent :)
+ # This would be better handled connecting externally to self.reply_button
self.dialog.destroy ()
class BugsDialog (gtk.Dialog):
@@ -426,7 +427,7 @@ class BugsDialog (gtk.Dialog):
self.destroy ()
def show_bug (self, number, *args):
- page = BugPage (self, number, self.queryonly, *args)
+ page = BugPage (self.assistant, self, number, self.queryonly, *args)
self.notebook.append_page (page, gtk.Label (number))
page.start ()
@@ -995,6 +996,34 @@ class HandleBTSQueryPage (TreePage):
self.filter.set_visible_func (self.filter_visible_func)
self.view.set_model (self.filter)
+class ShowReportPage (Page):
+ default_complete = True
+
+ def create_widget (self):
+ self.page = BugPage (self.assistant, None, None, None, None, None, None, None)
+ return self.page
+
+ def get_value (self):
+ return None
+
+ def is_valid (self, value):
+ return True
+
+ def sync_pre_operation (self, *args, **kwargs):
+ if kwargs.get ('queryonly'):
+ self.page_type = gtk.ASSISTANT_PAGE_CONFIRM
+ return args, kwargs
+
+ def execute (self, number, system, mirrors, http_proxy, queryonly=False, title='', archived='no'):
+ self.page.number = number
+ self.page.bts = system
+ self.page.mirrors = mirrors
+ self.page.http_proxy = http_proxy
+ self.page.queryonly = queryonly
+ self.page.archived = archived
+ self.page.start ()
+ self.validate ()
+
class DisplayReportPage (Page):
default_complete = True
@@ -1368,6 +1397,7 @@ def get_multiline (prompt, *args, **kwargs):
pages = { 'get_string': GetStringPage,
'menu': MenuPage,
'handle_bts_query': HandleBTSQueryPage,
+ 'show_report': ShowReportPage,
'long_message': LongMessagePage,
'display_report': DisplayReportPage,
'final_message': FinalMessagePage,
--
Reportbug - reports bugs in the Debian distribution
More information about the Reportbug-commits
mailing list