Commit Graph

29 Commits

Author SHA1 Message Date
Denis Fomin e194394479 imported patch 2011-08-27_00-06-54_r13163+.diff 2011-08-30 15:23:16 +03:00
Denis Fomin f13989927b remove unused pass 2011-01-04 00:12:07 +03:00
Denis Fomin acdf6571b7 use logger if plugin manifest file is wrong formated 2011-01-04 00:04:11 +03:00
Denis Fomin de559df7c0 pluginmanager. completely remove plugin 2010-11-05 14:56:31 +03:00
Yann Leboulanger 5fa8dab30f show warning dialog when trying to enable a plugin that raise an exception when activate is called. 2010-11-01 21:22:43 +01:00
Yann Leboulanger 8ce99327bd [Dicson] some error dialogs improvements. Fixes #5930 2010-09-21 21:44:04 +02:00
Yann Leboulanger 2c95192037 [Dicson] check for manifest file when installing a plugin. Fixes #5925 2010-09-20 07:08:47 +02:00
Alexander Cherniuk 0a2458c69b A better fix for nonexistent plugins directories. 2010-09-19 11:03:25 +03:00
Alexander Cherniuk 07af278d0b Ignore nonexistent plugins directories 2010-09-19 10:59:44 +03:00
Alexander Cherniuk ba5725cb5d Can not break a string like that. 2010-09-19 10:37:40 +03:00
Yann Leboulanger 0b448cfb10 [Dicson] use manifest.ini files in plugins to have a separate file for plugin's information. Fixes #5920 2010-09-18 23:00:43 +02:00
Yann Leboulanger 90d1ee3176 [Dicson] remove plugin entry in global config when removing the plugin. Fixes #5918 2010-09-17 21:16:17 +02:00
Yann Leboulanger 096b8f3d91 [Dicson] ability to install from zip / uninstall plugin. Fixes #5906 2010-09-14 19:31:35 +02:00
Éric Araujo 9b5ee1e13b convert tabs to spaces in source code thanks to reindent.py
Also use sed to remove now unneeded Vim lines, 2to3 -f ws_comma to fix
some whitespace, and fix some other madness manually.
2010-04-08 01:20:17 +02:00
Mateusz Biliński 8c75ed38b1 Google Translation plugin added (proof-of-concept) that translates incoming chat messages from English to French using Google Translate service.
Plugin object that registered new event is accessible in that event now, through self.plugin.
2008-08-25 17:20:16 +00:00
Mateusz Biliński c0a26be684 Three core (raw) events (iq, message, presence) go also through Network Events Controller (layer between network library and Global Events Dispatcher, newly added) and from there they are dispatched through Global Events Dispatcher.
Ability to register new incoming network events (based on exisiting one) added. Modify-only network events are possible (eg. add some text each message, but don't create any new global event). Events creation can be chained.
Examples of new network events classes are in New Events Example plugin.
Events from src/gajim.py now all go through Global Events Dispatcher and only through it (easy to modify, in chain, data passed with them).
2008-08-18 16:35:14 +00:00
Mateusz Biliński 8ec03d822e Added Events Dump plugin, that prints out to console info about selected events when they occur. 2008-08-11 15:22:56 +00:00
Mateusz Biliński 06aee9d2d0 Initial version of Global Events Dispatcher.
Events previously generated for D-Bus support in remote_control.py go through Global Events Dispatcher now - this means any plugin can subscribe to them.
Implemented D-Bus support plugin based on remote_control.py.
2008-08-10 13:40:49 +00:00
Mateusz Biliński d1d3cc9bbd GUI extension points removal working properly now. 2008-08-03 22:02:53 +00:00
Mateusz Biliński 16ac65e58b Improvements to GUI extension points handling - added method to remove these from PluginManager (memory optimization).
Removed logging from most of the code.
2008-08-03 13:29:11 +00:00
Mateusz Biliński 96cfc42060 Added files with Banner Tweaks plugin (initial version).
Few changes to PluginManager.
Added new GUI extension point related to draw_banner in ChatControlBase.
2008-07-31 15:30:20 +00:00
Mateusz Biliński 8581b862e1 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.
2008-06-18 20:45:22 +00:00
Mateusz Biliński b6593b9493 Plugin can be a package (directory) now. Added example plugin that modifies roster window (with glade file).
Added activate and deactivate methods to Plugin (used in forementioned RosterButtonsPlugin).
2008-06-14 18:20:24 +00:00
Mateusz Biliński fdd3648323 Small improvements: plug-in instance object dereferenced on deactivation. 'gajim.plugin_system' logger doesn't set level DEBUG by default (have to use command-line option '-l' from now on). 2008-06-08 16:36:46 +00:00
Mateusz Biliński e127925948 Added first version of 'Plugins' window. It's accessible through 'Edit/Plugins' item in roster menu. It seems that you can successfully (de)activate plug-ins through GUI now.
Added 'homepage' attribute to Plugin class.

Added (commented out) calls of pycallgraph in src/gajim.py for later use.

[xbright] Changed 'python' to 'python2.5' because code uses modules not available in previous versions of Python.
2008-06-07 17:28:34 +00:00
Mateusz Biliński 654e157eff Added plug-in deactivation mechanism, which allows plug-ins to clean up after themselves (eg. disconnecting handlers made in GUI); GUI extension points handlers are removed from list.
Updated Length Notifier plug-in so that it can be properly deactivated.
2008-06-03 13:40:27 +00:00
Mateusz Biliński 77f10031f1 Added mechanism to successfully load plugins after GUI extension points have been created, e.g. when we want to modify ChatControl behaviour and objects of this class have already been created.
Also: customized IPython console look
2008-06-03 08:25:16 +00:00
Mateusz Biliński f62698e28c Added docstrings in reST format (also with todos). Commented out 'print' statements related to roster window. A few modifications to make code prettier (PyLint driven). 2008-06-02 23:15:08 +00:00
Mateusz Biliński 95b1e45920 Initial commit related to plug-in system:
- basic PluginManager class that loads plugins from *.py files
  in given directories
- Singleton metaclass was created to use with PluginManager;
  notice: __init__ of class is called only once (not like in code
	that is included in Python Cookbook)
- variable to keep paths of plugin directories has been created
  (common.gajim.PLUGINS_DIRS); also added initilization of these
  paths to common.ConfigPaths
- added global variable with PluginManager object:
  common.gajim.plugin_manager
- created customized logger for plugin system ('gajim.plugin_system')
- created function decorator plugins.helpers.log_calls which logs
  each call of function/method; it also logs when function is left
- base class Plugin for plug-in implementation added; not much
  here - only empty class attributes: name, short_name, authors,
	version, description
- based on Plugin class, first plugin was created named
  LengthNotifierPlugin; it is used to notify users when they
  exceed given length of message during writing it (text entry
  field highlights)
- first GUI extension points works when ChatControl object
  is created (it is used in mentioned plugin)
- added 'epydoc.conf' file customized a little bit (file
	is also in trunk now)
- fixed indentation in common.sleepy module (also in trunk
	now)
2008-06-01 23:33:51 +00:00