[Reportbug-commits] [SCM] Reportbug - reports bugs in the Debian distribution branch, master, updated. 4.1-7-g33dcbe3

Luca Bruno lethalman88 at gmail.com
Mon Apr 13 20:48:41 UTC 2009


The following commit has been merged in the master branch:
commit a8560c4420e9ec583d45e1d8d0e46cd5ef4f48db
Author: Luca Bruno <lethalman88 at gmail.com>
Date:   Thu Apr 2 18:56:52 2009 +0200

    respect given order in menus. Fixes: #521162/3

diff --git a/debian/changelog b/debian/changelog
index 742e6db..fa7f5a5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -45,6 +45,7 @@ reportbug (4.1) unstable; urgency=low
     - make BTS query tree columns sortable
     - display report message in a dialog at the end, in substitution of pager and stdout
     - forward page when the user hits ENTER either on an entry or a menu
+    - respect given order in menus
     - ui focus and layout improvements
   * reportbug/ui/urwid_ui.py
     - fix default severity (to normal) in non-multiple menus; Closes: #496969
diff --git a/reportbug/ui/gtk2_ui.py b/reportbug/ui/gtk2_ui.py
index 08ab2cd..e71acff 100644
--- a/reportbug/ui/gtk2_ui.py
+++ b/reportbug/ui/gtk2_ui.py
@@ -785,10 +785,16 @@ class MenuPage (TreePage):
 
         default_iter = None
         if isinstance (options, dict):
-            for option, desc in options.iteritems ():
-                iter = self.model.append ((highlight (option), desc))
-                if option == default:
-                    default_iter = iter
+            if order:
+                for option in order:
+                    iter = self.model.append ((highlight (option), options[option]))
+                    if option == default:
+                        default_iter = iter
+            else:
+                for option, desc in options.iteritems ():
+                    iter = self.model.append ((highlight (option), desc))
+                    if option == default:
+                        default_iter = iter
         else:
             for row in options:
                 iter = self.model.append ((highlight (row[0]), row[1]))

-- 
Reportbug - reports bugs in the Debian distribution



More information about the Reportbug-commits mailing list