[gnome-keysign: 4/16] keylistwidget: fix PyGTKDeprecationWarning for Gtk.Label



commit 5f603c1b235faba5c7255c45d557e38da5ffc710
Author: RyuzakiKK <aasonykk gmail com>
Date:   Wed Dec 5 15:41:45 2018 +0100

    keylistwidget: fix PyGTKDeprecationWarning for Gtk.Label
    
    This commit fixes Gtk.Label() deprecation warning:
    
    PyGTKDeprecationWarning: Using positional arguments with the
    GObject constructor has been deprecated. Please specify keyword(s)
    for "label" or use a class specific constructor. See:
    https://wiki.gnome.org/PyGObject/InitializerDeprecations

 keysign/keylistwidget.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/keysign/keylistwidget.py b/keysign/keylistwidget.py
index 80445bb..780fc64 100755
--- a/keysign/keylistwidget.py
+++ b/keysign/keylistwidget.py
@@ -35,7 +35,7 @@ class ListBoxRowWithKey(Gtk.ListBoxRow):
         self.key = key
 
         s = self.format(key)
-        label = Gtk.Label(s, use_markup=True, xalign=0)
+        label = Gtk.Label(label=s, use_markup=True, xalign=0)
         self.add(label)
 
     @staticmethod


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]