Commit Graph

810 Commits

Author SHA1 Message Date
Yann Leboulanger 59534e95e1 add missing plugins/Makefile.am 2010-07-29 12:50:54 +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
Yann Leboulanger 73a4c4e1b9 fix acronyms expander plugin 2010-02-12 20:41:21 +01:00
Yann Leboulanger ad8c7a0f41 add adjustment to spinbutton in length notifier plugin 2010-02-12 09:14:47 +01:00
Yann Leboulanger fa05d88b2b merge from default branch 2010-02-08 22:25:41 +01:00
Mateusz Biliński e8c3ba51b2 Fixed bug related to account name in NewEventsExample name. Modified way to acquire message type. 2009-06-21 23:12:30 +02:00
Mateusz Biliński 6fecd84b16 Fixed log_calls decorator arguments in a few plugins. Fixed Acronyms Expander plugin (not working due to bad auto-merge). Added few comments. 2009-06-15 07:56:08 +02:00
Mateusz Biliński 018bda5a5f Merged default branch with plugin-system branch. Not all elements are fully
functional. This should be considered as sync commit.
2009-06-07 00:00:03 +02:00
Mateusz Biliński e8d704e96b Moved DBUS interface related variables. 2009-06-02 19:59:33 +02:00
Mateusz Biliński 369ea5544b Moved DBus type related instructions to scope which is executed only when there's a DBus support. No NameError exceptions are thrown anymore.
Makes debugging of plugins easier under WingIDE (which does not remember - at least it looks like that - the "ignore exception at this location" option when module is imported 'manually').

This could also be applied to src/remote_control.py .
2009-04-16 08:37:16 +00: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 ff8eaddf51 Removed exit() from PySnarl so it doesn't terminate Gajim on non-Windows platforms. 2008-08-16 20:53:10 +00:00
Mateusz Biliński 94f27ecffc Snarl Notifications plugin initial version added. New events (from current core) go also through GED. 2008-08-16 20:30:37 +00:00
Mateusz Biliński 2ee4c7ee5e Changed log_calls parameter to EventsDumpPlugin in that class. 2008-08-11 15:38:07 +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 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 5cce0a8ca9 Banner Tweaks plugin has all (four) options implemented. 2008-08-02 17:29:32 +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 8aa9cad2e0 Plugin's configuration is now saved to disk (currently: using UserDict and shelve modules).
Length Notifier Plugin has configuration dialog (added entry with JIDs to be included when plugin is working) - fully usable.

Default values of configuration key has been added to GajimPlugin.

Some other minor changes/fixes.
2008-07-29 19:09:28 +00:00
Mateusz Biliński aaf5b30129 Added GajimPluginConfigDialog class - dialog that plugins should use to present configuration to user.
Now, 'Configure' button is invoked only for plug-ins that have config_dialog.
2008-06-19 12:56:45 +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 11e61ea2a2 Small changes toward handling plug-ins configuration. 2008-06-12 18:26:08 +00:00
Mateusz Biliński 5dbe58507e Added 'chat_control_base' GUI extension point (now we are able to modify all chat controls - both normal and GC.
Added base version of AcronymsExpanderPlugin with some hardcoded acronyms. It uses newly added 'chat_control_base' extension point.
2008-06-09 11:46:29 +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 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
Yann Leboulanger 149ed7a22d reorder files 2005-04-12 15:47:20 +00:00
Yann Leboulanger fbf6c84e52 update files from trunk 2005-04-12 15:30:09 +00:00
Yann Leboulanger 317f0e0db3 we can now open only one join_gc window per account 2005-04-07 11:25:59 +00:00
Yann Leboulanger 25214a9cf2 close the vcard window when we press Escape
minimum width in gc window for the contact list on the left
2005-04-07 10:42:01 +00:00
Yann Leboulanger 058f632115 close the join_gc_window when we press Escape 2005-04-07 09:53:54 +00:00
Nikos Kouremenos 3014afd583 new basic emoticons 2005-04-07 00:35:06 +00:00
Yann Leboulanger 0a6658b90b remove commented line 2005-04-06 22:53:39 +00:00
Yann Leboulanger 3b84f1c242 we now saved the recently visited groupchats so we can restore it quickly 2005-04-06 22:52:48 +00:00
Yann Leboulanger 10dcd45494 small bugfix: we save the Join_groupchat_window instance in the __init__ function 2005-04-06 22:03:12 +00:00
Yann Leboulanger 91d6e8841a some glade fixes: minimum height of message textview in groupchat window
client info and os info on 2 lines instead of one in vcard_information_windows
2005-04-06 21:56:01 +00:00
Yann Leboulanger 00d7923d91 autodetect the python version in the Makefile (thx tab) 2005-04-06 20:30:37 +00:00
Yann Leboulanger 85527841a2 we now show the os informations in the vcard_information_window 2005-04-06 20:18:55 +00:00
Nikos Kouremenos eb5ae0d4ce bugfix 2005-04-06 19:46:39 +00:00
Nikos Kouremenos 1c7076cfb0 fixes for when disabling emoticons in prefs [gajim did not boot], add_remove_emoticons_window and class, better popups [needs more attention {me is on it}], no more emoticons tab, introducing version.py, hide os information included, and fixes allover. 2005-04-06 18:51:54 +00:00
Yann Leboulanger bac6ec88dd close the groupchat window when esc is pressed 2005-04-06 07:31:18 +00:00
Yann Leboulanger 62e05c0c2c a single click on the arrow in groupschat_window expand / collapse the group 2005-04-05 22:01:51 +00:00
Nikos Kouremenos 6ac64ad577 typo 2005-04-05 21:37:50 +00:00
Nikos Kouremenos 40e247e220 popup class is ready 2005-04-05 15:06:11 +00:00
Yann Leboulanger 96e8c8a447 change the bg color instead of the fg color when a contact (dis)connects. Colors have to be improved 2005-04-05 09:38:52 +00:00
Yann Leboulanger 634440c762 bugfix: when we Drag and drop a contact that is connected with several resources 2005-04-05 09:10:16 +00:00
Yann Leboulanger 1e7afe35d6 show the history window when we open it 2005-04-05 07:41:38 +00:00