diff options
author | Garrett Regier <garrettregier@gmail.com> | 2015-03-14 11:17:55 -0700 |
---|---|---|
committer | Garrett Regier <garrettregier@gmail.com> | 2015-03-14 11:17:55 -0700 |
commit | cbe30d8b89995d24010c51739ed5b1d5c096f82e (patch) | |
tree | 889e2523c4427fbfd476674f4f667a38d1219121 /tests | |
parent | c05553552f00ada595ff65382138e1a9c93ce616 (diff) | |
download | libpeas-cbe30d8b89995d24010c51739ed5b1d5c096f82e.tar.gz |
Use Property instead of property as it is deprecated in PyGObject
Diffstat (limited to 'tests')
-rw-r--r-- | tests/libpeas/plugins/extension-python/extension-py.py.in | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/tests/libpeas/plugins/extension-python/extension-py.py.in b/tests/libpeas/plugins/extension-python/extension-py.py.in index e3ecb60..728b399 100644 --- a/tests/libpeas/plugins/extension-python/extension-py.py.in +++ b/tests/libpeas/plugins/extension-python/extension-py.py.in @@ -31,15 +31,11 @@ class ExtensionPythonPlugin(GObject.Object, Peas.Activatable, Introspection.Base, Introspection.Callable, Introspection.HasPrerequisite): - object = GObject.property(type=GObject.Object) - - @GObject.property(type=int) - def update_count(self): - return self.__update_count + object = GObject.Property(type=GObject.Object) + update_count = GObject.Property(type=int, default=0, minimum=0) def __init__(self): self.__lock = threading.Lock() - self.__update_count = 0 def do_activate(self): pass @@ -49,7 +45,7 @@ class ExtensionPythonPlugin(GObject.Object, Peas.Activatable, def do_update_state(self): with self.__lock: - self.__update_count += 1 + self.update_count += 1 def do_get_plugin_info(self): return self.plugin_info |