Commit 9ce981e0 authored by Alexandru Băluț's avatar Alexandru Băluț

prefs: Fix g_object_set_is_valid_property warning

Fixes #2094
parent 47131b39
Pipeline #50352 passed with stages
in 18 minutes and 11 seconds
......@@ -657,21 +657,17 @@ class PluginManagerStore(Gio.ListStore):
"""Stores the models for available plugins."""
def __init__(self):
Gio.ListStore.__init__(self)
Gio.ListStore.__init__(self, item_type=PluginItem)
self.app = None
self.preferences_dialog = None
@classmethod
def new(cls, app, preferences_dialog):
obj = PluginManagerStore()
obj.app = app
obj.preferences_dialog = preferences_dialog
# FIXME
# For some reason this property cannot be set at construct time
# with GObject.Object.new.
obj.set_property("item-type", PluginItem)
obj.reload()
return obj
store = PluginManagerStore()
store.app = app
store.preferences_dialog = preferences_dialog
store.reload()
return store
def reload(self):
self.remove_all()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment