[gnome-keysign: 7/16] Switch from GObject.SIGNAL_RUN_LAST to GObject.SignalFlags.RUN_LAST



commit c9fba4b97e9c27d1fbd42c24a147fd9db1697718
Author: RyuzakiKK <aasonykk gmail com>
Date:   Wed Dec 5 16:16:17 2018 +0100

    Switch from GObject.SIGNAL_RUN_LAST to GObject.SignalFlags.RUN_LAST
    
    This is the warning we got:
    
    PyGIDeprecationWarning: GObject.SIGNAL_RUN_LAST is deprecated; use
    GObject.SignalFlags.RUN_LAST instead

 keysign/avahidiscovery.py       | 2 +-
 keysign/keyconfirm.py           | 2 +-
 keysign/keyfprscan.py           | 4 ++--
 keysign/keylistwidget.py        | 4 ++--
 keysign/network/AvahiBrowser.py | 4 ++--
 keysign/scan_barcode.py         | 2 +-
 6 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/keysign/avahidiscovery.py b/keysign/avahidiscovery.py
index 513a234..2419632 100755
--- a/keysign/avahidiscovery.py
+++ b/keysign/avahidiscovery.py
@@ -57,7 +57,7 @@ class AvahiKeysignDiscovery(GObject.GObject):
     __gsignals__ = {
         # Gets emitted whenever a new server has been found or has been removed.
         # Is also emitted shortly after an object has been created.
-        str("list-changed"): (GObject.SIGNAL_RUN_LAST, None, (int,)),
+        str("list-changed"): (GObject.SignalFlags.RUN_LAST, None, (int,)),
     }
 
     def __init__(self, *args, **kwargs):
diff --git a/keysign/keyconfirm.py b/keysign/keyconfirm.py
index b5c6d0e..a48b161 100755
--- a/keysign/keyconfirm.py
+++ b/keysign/keyconfirm.py
@@ -85,7 +85,7 @@ class PreSignWidget(Gtk.VBox):
     """
 
     __gsignals__ = {
-        str('sign-key-confirmed'): (GObject.SIGNAL_RUN_LAST, None,
+        str('sign-key-confirmed'): (GObject.SignalFlags.RUN_LAST, None,
                                     (GObject.TYPE_PYOBJECT,)),
     }
 
diff --git a/keysign/keyfprscan.py b/keysign/keyfprscan.py
index 58f2a21..ff1846a 100755
--- a/keysign/keyfprscan.py
+++ b/keysign/keyfprscan.py
@@ -56,12 +56,12 @@ class KeyFprScanWidget(Gtk.VBox):
 
     __gsignals__ = {
         # This is the Gtk widget signal's name
-        str('changed'): (GObject.SIGNAL_RUN_LAST, None,
+        str('changed'): (GObject.SignalFlags.RUN_LAST, None,
                         (GObject.TYPE_PYOBJECT,)),
         # It's probably not the best name for that signal.
         # While "barcode_scanned" might be better, it is probably
         # unneccesarily specific.
-        str('barcode'): (GObject.SIGNAL_RUN_LAST, None,
+        str('barcode'): (GObject.SignalFlags.RUN_LAST, None,
                         (str, # The barcode string
                          Gst.Message.__gtype__, # The GStreamer message itself
                          GdkPixbuf.Pixbuf.__gtype__,),) # The pixbuf which caused
diff --git a/keysign/keylistwidget.py b/keysign/keylistwidget.py
index 780fc64..26845d5 100755
--- a/keysign/keylistwidget.py
+++ b/keysign/keylistwidget.py
@@ -105,11 +105,11 @@ class KeyListWidget(Gtk.HBox):
     and potentially display a user facing warning. Or not.
     """
     __gsignals__ = {
-        str('key-activated'): (GObject.SIGNAL_RUN_LAST, None,
+        str('key-activated'): (GObject.SignalFlags.RUN_LAST, None,
                                # (ListBoxRowWithKey.__gtype__,)
                                (object,)),
                                # The activated key
-        str('key-selected'): (GObject.SIGNAL_RUN_LAST, None,
+        str('key-selected'): (GObject.SignalFlags.RUN_LAST, None,
                                # (ListBoxRowWithKey.__gtype__,)
                                (object,)),
                                # The selected key
diff --git a/keysign/network/AvahiBrowser.py b/keysign/network/AvahiBrowser.py
index c021af9..5062d0d 100644
--- a/keysign/network/AvahiBrowser.py
+++ b/keysign/network/AvahiBrowser.py
@@ -65,10 +65,10 @@ if getattr(avahi, 'txt_array_to_dict', None) is None:
 
 class AvahiBrowser(GObject.GObject):
     __gsignals__ = {
-        str('new_service'): (GObject.SIGNAL_RUN_LAST, None,
+        str('new_service'): (GObject.SignalFlags.RUN_LAST, None,
             # name, address (could be an int too (for IPv4)), port, txt_dict
             (str, str, int, object)),
-        str('remove_service'): (GObject.SIGNAL_RUN_LAST, None,
+        str('remove_service'): (GObject.SignalFlags.RUN_LAST, None,
             # string 'remove'(placeholder: tuple element must be sequence), name
             (str, str)),
     }
diff --git a/keysign/scan_barcode.py b/keysign/scan_barcode.py
index d0d7234..a594743 100755
--- a/keysign/scan_barcode.py
+++ b/keysign/scan_barcode.py
@@ -40,7 +40,7 @@ log = logging.getLogger(__name__)
 class BarcodeReaderGTK(Gtk.Box):
 
     __gsignals__ = {
-        str('barcode'): (GObject.SIGNAL_RUN_LAST, None,
+        str('barcode'): (GObject.SignalFlags.RUN_LAST, None,
                         (str, # The barcode string
                          Gst.Message.__gtype__, # The GStreamer message itself
                          GdkPixbuf.Pixbuf.__gtype__, # The pixbuf which caused


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