-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

More patches.
- -- 
http://syx.googlecode.com - Smalltalk YX
http://lethalman.blogspot.com - Thoughts about computer technologies
http://www.ammazzatecitutti.org - Ammazzateci tutti
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkjFUeQACgkQw9Qj+8Kak3EwEwCdHFEl6HE25YLPY7l89TiTYVW6
PXcAn3qnI0+1tQQKYkCHueWJ0zDnww+v
=sYtw
-----END PGP SIGNATURE-----
From 9c54219c9a168ae320d9a5e1e24291020038430b Mon Sep 17 00:00:00 2001
From: Luca Bruno <[EMAIL PROTECTED]>
Date: Mon, 8 Sep 2008 18:04:29 +0200
Subject: [PATCH] Set swirl icon for the window

---
 reportbug/ui/gtk2_ui.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/reportbug/ui/gtk2_ui.py b/reportbug/ui/gtk2_ui.py
index 77c4056..5bfd0af 100644
--- a/reportbug/ui/gtk2_ui.py
+++ b/reportbug/ui/gtk2_ui.py
@@ -43,6 +43,7 @@ from reportbug import debianbts
 from reportbug.urlutils import launch_browser
 
 ISATTY = True
+DEBIAN_LOGO = "/usr/share/pixmaps/debian-logo.png"
 
 global application, assistant
 
@@ -443,7 +444,7 @@ class Page (ReportbugConnector):
     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
@@ -1088,6 +1089,7 @@ class ReportbugAssistant (gtk.Assistant):
     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
-- 
1.5.6.5

From 57cd3ff3d242342570c8998840b3e6751e5f0d4b Mon Sep 17 00:00:00 2001
From: Luca Bruno <[EMAIL PROTECTED]>
Date: Mon, 8 Sep 2008 18:22:57 +0200
Subject: [PATCH] Add support for querybts and queryonly

---
 reportbug/ui/gtk2_ui.py |   25 ++++++++++++++++---------
 1 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/reportbug/ui/gtk2_ui.py b/reportbug/ui/gtk2_ui.py
index 5bfd0af..c21b72a 100644
--- a/reportbug/ui/gtk2_ui.py
+++ b/reportbug/ui/gtk2_ui.py
@@ -277,13 +277,14 @@ class BugReport (object):
 # 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
@@ -348,10 +349,11 @@ class BugPage (gtk.EventBox, threading.Thread):
         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)
@@ -369,11 +371,12 @@ class BugPage (gtk.EventBox, threading.Thread):
         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)
@@ -384,7 +387,7 @@ class BugsDialog (gtk.Dialog):
         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 ()
         
@@ -744,12 +747,16 @@ class HandleBTSQueryPage (TreePage):
     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:
@@ -853,7 +860,7 @@ class HandleBTSQueryPage (TreePage):
             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 ()
-- 
1.5.6.5

From 4e3c4eb4fa3ed7f1c207f444d6b7a4fd4c39c532 Mon Sep 17 00:00:00 2001
From: Luca Bruno <[EMAIL PROTECTED]>
Date: Mon, 8 Sep 2008 18:23:17 +0200
Subject: [PATCH] Initialize ui in bin/querybts

---
 bin/querybts |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/bin/querybts b/bin/querybts
index b350996..fa1d762 100755
--- a/bin/querybts
+++ b/bin/querybts
@@ -182,6 +182,7 @@ def main():
                             'Falling back to %s interface.\n',
                             interface, msg, ui_mode)
             ewrite('\n')
+    ui.initialize ()
 
     reportre = re.compile(r'^#?(\d+)$')
     try:
-- 
1.5.6.5

From 1fe49cbe2c12cba553e51190b68d8651839893e5 Mon Sep 17 00:00:00 2001
From: Luca Bruno <[EMAIL PROTECTED]>
Date: Mon, 8 Sep 2008 18:23:47 +0200
Subject: [PATCH] Fix urwid to use the new reportbug library codebase

---
 reportbug/ui/urwid_ui.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/reportbug/ui/urwid_ui.py b/reportbug/ui/urwid_ui.py
index 340f59a..900d92b 100644
--- a/reportbug/ui/urwid_ui.py
+++ b/reportbug/ui/urwid_ui.py
@@ -492,7 +492,7 @@ def select_multiple(par, options, prompt, title=None, order=None, extras=None):
 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 show_report(number, system, mirrors,
 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')
-- 
1.5.6.5

_______________________________________________
Reportbug-maint mailing list
Reportbug-maint@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/reportbug-maint

Reply via email to