[Reportbug-commits] [reportbug] 24/31: gtk2_ui: Reduce deprecation spam by using named properties

Sandro Tosi morph at moszumanska.debian.org
Mon Jan 16 01:36:58 UTC 2017


This is an automated email from the git hooks/post-receive script.

morph pushed a commit to branch master
in repository reportbug.

commit 99302296c8d20a4d2985da760b938a13985cecaa
Author: Simon McVittie <smcv at debian.org>
Date:   Sun Jan 15 00:22:53 2017 +0000

    gtk2_ui: Reduce deprecation spam by using named properties
    
    Positional parameters to most GObject constructors are deprecated.
---
 reportbug/ui/gtk2_ui.py | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/reportbug/ui/gtk2_ui.py b/reportbug/ui/gtk2_ui.py
index 79abd0e..65c0fb3 100644
--- a/reportbug/ui/gtk2_ui.py
+++ b/reportbug/ui/gtk2_ui.py
@@ -472,7 +472,7 @@ class BugPage(Gtk.EventBox, threading.Thread):
         button.connect('clicked', self.on_open_browser)
         bbox.pack_start(button, True, True, 0)
         if not self.queryonly:
-            button = Gtk.Button("Reply")
+            button = Gtk.Button(label="Reply")
             button.set_image(Gtk.Image.new_from_stock(Gtk.STOCK_EDIT, Gtk.IconSize.BUTTON))
             button.connect('clicked', self.on_reply)
             bbox.pack_start(button, True, True, 0)
@@ -515,7 +515,7 @@ class BugsDialog(Gtk.Dialog):
 
     def show_bug(self, number, *args):
         page = BugPage(self.assistant, self, number, self.queryonly, *args)
-        self.notebook.append_page(page, Gtk.Label(number))
+        self.notebook.append_page(page, Gtk.Label(label=number))
         page.start()
 
 
@@ -705,7 +705,7 @@ class IntroPage(Page):
 
         vbox = Gtk.VBox(spacing=24)
 
-        label = Gtk.Label("""
+        label = Gtk.Label(label="""
 <b>Reportbug</b> is a tool designed to make the reporting of bugs in Debian and derived distributions relatively painless.
 
 This wizard will guide you through the bug reporting process step by step.
@@ -1088,11 +1088,11 @@ class HandleBTSQueryPage(TreePage):
     def create_widget(self):
         _assert_context(ui_context)
         vbox = Gtk.VBox(spacing=6)
-        self.label = Gtk.Label("List of bugs. Select a bug to retrieve and submit more information.")
+        self.label = Gtk.Label(label="List of bugs. Select a bug to retrieve and submit more information.")
         vbox.pack_start(self.label, False, True, 6)
 
         hbox = Gtk.HBox(spacing=6)
-        label = Gtk.Label("Filter:")
+        label = Gtk.Label(label="Filter:")
         hbox.pack_start(label, False, True, 0)
         self.entry = Gtk.Entry()
         hbox.pack_start(self.entry, True, True, 0)
@@ -1114,7 +1114,7 @@ class HandleBTSQueryPage(TreePage):
             self.view.append_column(column)
         vbox.pack_start(scrolled, True, True, 0)
 
-        button = Gtk.Button("Retrieve and submit bug information")
+        button = Gtk.Button(label="Retrieve and submit bug information")
         button.set_image(Gtk.Image.new_from_stock(Gtk.STOCK_INFO, Gtk.IconSize.BUTTON))
         button.connect('clicked', self.on_retrieve_info)
         vbox.pack_start(button, False, True, 0)
@@ -1300,7 +1300,7 @@ class EditorPage(Page):
         _assert_context(ui_context)
         vbox = Gtk.VBox(spacing=6)
         hbox = Gtk.HBox(spacing=12)
-        hbox.pack_start(Gtk.Label("Subject: "), False, True, 0)
+        hbox.pack_start(Gtk.Label(label="Subject: "), False, True, 0)
         self.subject = Gtk.Entry()
         hbox.pack_start(self.subject, True, True, 0)
         vbox.pack_start(hbox, False, True, 0)
@@ -1335,7 +1335,7 @@ class EditorPage(Page):
 
         if gtkspellcheck is NotImplemented:
             box = Gtk.EventBox()
-            label = Gtk.Label("Please install <b>python-gtkspellcheck</b> to enable spell checking")
+            label = Gtk.Label(label="Please install <b>python-gtkspellcheck</b> to enable spell checking")
             label.set_use_markup(True)
             label.set_line_wrap(True)
             label.set_selectable(True)
@@ -1448,12 +1448,12 @@ class SelectOptionsPage(Page):
                 continue
             # stdout is a textview for us
             if 'Print message to stdout' in desc:
-                button = Gtk.Button("Display message in a text view")
+                button = Gtk.Button(label="Display message in a text view")
                 button.connect('clicked', self.on_display_clicked)
                 buttons.append(button)
             else:
                 button = Gtk.Button()
-                label = Gtk.Label(options[menuopt.lower()])
+                label = Gtk.Label(label=options[menuopt.lower()])
                 button.add(label)
                 button.connect('clicked', self.on_clicked, menuopt.lower())
                 if menuopt.isupper():

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reportbug/reportbug.git



More information about the Reportbug-commits mailing list