Plugin cleanup and tweaks
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
# Python imports
|
||||
import os
|
||||
import inspect
|
||||
import json
|
||||
|
||||
# Lib imports
|
||||
@@ -31,20 +30,9 @@ class Plugin(PluginBase):
|
||||
|
||||
|
||||
def run(self):
|
||||
self._builder = Gtk.Builder()
|
||||
self._builder = Gtk.Builder()
|
||||
self._builder.add_from_file(self._GLADE_FILE)
|
||||
|
||||
classes = [self]
|
||||
handlers = {}
|
||||
for c in classes:
|
||||
methods = None
|
||||
try:
|
||||
methods = inspect.getmembers(c, predicate=inspect.ismethod)
|
||||
handlers.update(methods)
|
||||
except Exception as e:
|
||||
print(repr(e))
|
||||
|
||||
self._builder.connect_signals(handlers)
|
||||
self._connect_builder_signals(self, self._builder)
|
||||
|
||||
self._favorites_dialog = self._builder.get_object("favorites_dialog")
|
||||
self._favorites_store = self._builder.get_object("favorites_store")
|
||||
|
Reference in New Issue
Block a user