Added new 'init' method to Plugin class that plugins can implement to make...
Added new 'init' method to Plugin class that plugins can implement to make actions that need to be done only once - when plugin is added (not activated) to Gajim. In this method plugins should declare handlers for GUI extension points. This was created so that __init__ method doesn't have to be reimplemented in specific way (create config, load config) - it is all done by __init__ in Plugin class. If __init__ is reimplemented, it must call Plugin __init__ (eg. using super() ) to plugin work properly. Example plug-ins were modified to use init() instead of __init__(). Added new category in configuration - 'plugins'. It only holds one option for each plugin - 'active', which determines whether plugin should be activated on startup. Now, Gajim remembers which plugins are active on exit, and activates them on next startup.
Showing
- plugins/acronyms_expander.py 8 additions, 6 deletionsplugins/acronyms_expander.py
- plugins/length_notifier.py 6 additions, 4 deletionsplugins/length_notifier.py
- plugins/roster_buttons/plugin.py 9 additions, 9 deletionsplugins/roster_buttons/plugin.py
- src/common/config.py 3 additions, 0 deletionssrc/common/config.py
- src/gajim-remote.py 2 additions, 0 deletionssrc/gajim-remote.py
- src/plugins/gui.py 7 additions, 7 deletionssrc/plugins/gui.py
- src/plugins/plugin.py 9 additions, 5 deletionssrc/plugins/plugin.py
- src/plugins/pluginmanager.py 64 additions, 38 deletionssrc/plugins/pluginmanager.py
Please register or sign in to comment