[Reportbug-commits] r651 - in trunk (7 files)
morph-guest at users.alioth.debian.org
morph-guest at users.alioth.debian.org
Mon Sep 8 21:55:09 UTC 2008
Date: Monday, September 8, 2008 @ 21:55:07
Author: morph-guest
Revision: 651
applied Luca's patches for GTK+ ui
Modified:
trunk/bin/querybts
trunk/debian/changelog
trunk/man/querybts.1
trunk/man/reportbug.1
trunk/man/reportbug.conf.5
trunk/reportbug/ui/gtk2_ui.py
trunk/reportbug/ui/urwid_ui.py
Modified: trunk/bin/querybts
===================================================================
--- trunk/bin/querybts 2008-09-07 16:16:54 UTC (rev 650)
+++ trunk/bin/querybts 2008-09-08 21:55:07 UTC (rev 651)
@@ -182,6 +182,7 @@
'Falling back to %s interface.\n',
interface, msg, ui_mode)
ewrite('\n')
+ ui.initialize ()
reportre = re.compile(r'^#?(\d+)$')
try:
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2008-09-07 16:16:54 UTC (rev 650)
+++ trunk/debian/changelog 2008-09-08 21:55:07 UTC (rev 651)
@@ -44,8 +44,10 @@
* reportbug/debianbts.py
- added buildd.emdebian.org and debian-i18n pseudo-packages
+ * man/{querybts.1,reportbug.1,reportbug.conf.5}
+ - added UI information; thanks to Luca Bruno's patch
- -- Sandro Tosi <matrixhasu at gmail.com> Sat, 06 Sep 2008 00:50:37 +0200
+ -- Sandro Tosi <matrixhasu at gmail.com> Mon, 08 Sep 2008 23:53:51 +0200
reportbug (3.45) unstable; urgency=low
Modified: trunk/man/querybts.1
===================================================================
--- trunk/man/querybts.1 2008-09-07 16:16:54 UTC (rev 650)
+++ trunk/man/querybts.1 2008-09-08 21:55:07 UTC (rev 651)
@@ -48,6 +48,11 @@
.B \-s, \-\-source
Query on source packages, rather than binary packages.
.TP
+.B \-u, \-\-ui
+Specify the user interface to use.
+Valid options are \fBtext\fP, \fBnewt\fP, \fBurwid\fP, \fBgtk2\fP;
+default is taken from the reportbug configuration files.
+.TP
.B \-w, \-\-web
Launch a web browser to view bug reports, instead of using the
internal interface. This will also allow you to see all of the
Modified: trunk/man/reportbug.1
===================================================================
--- trunk/man/reportbug.1 2008-09-07 16:16:54 UTC (rev 650)
+++ trunk/man/reportbug.1 2008-09-08 21:55:07 UTC (rev 651)
@@ -403,6 +403,11 @@
.B \-\-template
Output a template report to standard output.
.TP
+.B \-u, \-\-ui
+Specify the user interface to use.
+Valid options are \fBtext\fP, \fBnewt\fP, \fBurwid\fP, \fBgtk2\fP;
+default is taken from the reportbug configuration files.
+.TP
.B \-v, \-\-verify
Verify the integrity of the package (if installed) using debsums
before reporting.
Modified: trunk/man/reportbug.conf.5
===================================================================
--- trunk/man/reportbug.conf.5 2008-09-07 16:16:54 UTC (rev 650)
+++ trunk/man/reportbug.conf.5 2008-09-08 21:55:07 UTC (rev 651)
@@ -235,7 +235,7 @@
Use the template mode, bypasses all prompts and the output it sent to
stdout
.TP
-.B ui [\fItext\fP|\fInewt\fP]
+.B ui [\fItext\fP|\fInewt\fP|\fIurwid\fP|\fIgtk2\fP]
The user interface that
.B querybts(1)
and
Modified: trunk/reportbug/ui/gtk2_ui.py
===================================================================
--- trunk/reportbug/ui/gtk2_ui.py 2008-09-07 16:16:54 UTC (rev 650)
+++ trunk/reportbug/ui/gtk2_ui.py 2008-09-08 21:55:07 UTC (rev 651)
@@ -43,6 +43,7 @@
from reportbug.urlutils import launch_browser
ISATTY = True
+DEBIAN_LOGO = "/usr/share/pixmaps/debian-logo.png"
global application, assistant
@@ -276,13 +277,14 @@
# BTS GUI
class BugPage (gtk.EventBox, threading.Thread):
- def __init__ (self, dialog, number, bts, mirrors, http_proxy, archived):
+ def __init__ (self, dialog, number, queryonly, bts, mirrors, http_proxy, archived):
threading.Thread.__init__ (self)
gtk.EventBox.__init__ (self)
self.dialog = dialog
self.assistant = self.dialog.assistant
self.application = self.assistant.application
self.number = number
+ self.queryonly = queryonly
self.bts = bts
self.mirrors = mirrors
self.http_proxy = http_proxy
@@ -347,10 +349,11 @@
button = gtk.Button ("Open in browser")
button.connect ('clicked', self.on_open_browser)
bbox.pack_start (button)
- button = gtk.Button ("Reply")
- button.set_image (gtk.image_new_from_stock (gtk.STOCK_EDIT, gtk.ICON_SIZE_BUTTON))
- button.connect ('clicked', self.on_reply)
- bbox.pack_start (button)
+ if not self.queryonly:
+ button = gtk.Button ("Reply")
+ button.set_image (gtk.image_new_from_stock (gtk.STOCK_EDIT, gtk.ICON_SIZE_BUTTON))
+ button.connect ('clicked', self.on_reply)
+ bbox.pack_start (button)
vbox.pack_start (bbox, expand=False)
self.add (vbox)
@@ -368,11 +371,12 @@
self.dialog.destroy ()
class BugsDialog (gtk.Dialog):
- def __init__ (self, assistant):
+ def __init__ (self, assistant, queryonly):
gtk.Dialog.__init__ (self, "Reportbug: bug information", assistant,
gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,
(gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE))
self.assistant = assistant
+ self.queryonly = queryonly
self.application = assistant.application
self.notebook = gtk.Notebook ()
self.vbox.pack_start (self.notebook)
@@ -383,7 +387,7 @@
self.destroy ()
def show_bug (self, number, *args):
- page = BugPage (self, number, *args)
+ page = BugPage (self, number, self.queryonly, *args)
self.notebook.append_page (page, gtk.Label (number))
page.start ()
@@ -443,7 +447,7 @@
next_page_num = 0
page_type = gtk.ASSISTANT_PAGE_CONTENT
default_complete = False
- side_image = "/usr/share/pixmaps/debian-logo.png"
+ side_image = DEBIAN_LOGO
def __init__ (self, assistant):
self.assistant = assistant
@@ -743,12 +747,16 @@
value_column = 0
def sync_pre_operation (self, package, bts, mirrors=None, http_proxy="", queryonly=False, screen=None,
- archived='no', source=False, version=None):
+ archived='no', source=False, title=None, version=None):
self.bts = bts
self.mirrors = mirrors
self.http_proxy = http_proxy
self.archived = archived
+ self.queryonly = queryonly
+ if queryonly:
+ self.page_type = gtk.ASSISTANT_PAGE_CONFIRM
+
sysinfo = debianbts.SYSTEMS[bts]
root = sysinfo.get('btsroot')
if not root:
@@ -852,7 +860,7 @@
info_dialog ("Please select one ore more bugs")
return
- dialog = BugsDialog (self.assistant)
+ dialog = BugsDialog (self.assistant, self.queryonly)
for id in bug_ids:
dialog.show_bug (id, self.bts, self.mirrors, self.http_proxy, self.archived)
dialog.show_all ()
@@ -1024,6 +1032,7 @@
self.label = gtk.Label ()
self.vbox = gtk.VBox (spacing=6)
self.vbox.pack_start (self.label, expand=False, padding=6)
+ self.default = None
return self.vbox
def on_clicked (self, button, menuopt):
@@ -1034,11 +1043,11 @@
if self.default:
self.default.set_flags (gtk.CAN_DEFAULT | gtk.HAS_DEFAULT)
self.default.grab_default ()
+ self.default.grab_focus ()
def execute (self, prompt, menuopts, options):
self.label.set_text (prompt)
- self.default = None
buttons = []
for menuopt in menuopts:
desc = options[menuopt.lower ()]
@@ -1087,6 +1096,7 @@
def __init__ (self, application):
gtk.Assistant.__init__ (self)
self.set_title ('Reportbug')
+ self.set_icon_from_file (DEBIAN_LOGO)
self.application = application
self.showing_page = None
self.requested_page = None
Modified: trunk/reportbug/ui/urwid_ui.py
===================================================================
--- trunk/reportbug/ui/urwid_ui.py 2008-09-07 16:16:54 UTC (rev 650)
+++ trunk/reportbug/ui/urwid_ui.py 2008-09-08 21:55:07 UTC (rev 651)
@@ -492,7 +492,7 @@
def show_report(number, system, mirrors,
http_proxy, screen=None, queryonly=False, title='',
archived='no'):
- import debianbts
+ from reportbug import debianbts
ui = screen
if not ui:
@@ -531,7 +531,7 @@
def handle_bts_query(package, bts, mirrors=None, http_proxy="",
queryonly=False, screen=None, title="", archived='no',
source=False, version=None):
- import debianbts
+ from reportbug import debianbts
sysinfo = debianbts.SYSTEMS[bts]
root = sysinfo.get('btsroot')
More information about the Reportbug-commits
mailing list