Commit Graph

56 Commits

Author SHA1 Message Date
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