diff options
author | Mateusz Biliński <mateusz.bilinski@gmail.com> | 2009-06-15 09:56:08 +0400 |
---|---|---|
committer | Mateusz Biliński <mateusz.bilinski@gmail.com> | 2009-06-15 09:56:08 +0400 |
commit | 6fecd84b16d7f5a4ae9303c757f60651dbbc829a (patch) | |
tree | 3537f744c5927886ad4fff7d1b40301023f43468 /plugins | |
parent | 7b0a099feb7d45dd9ebca81fa8b660313f87a8a7 (diff) |
Fixed log_calls decorator arguments in a few plugins. Fixed Acronyms Expander plugin (not working due to bad auto-merge). Added few comments.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/dbus_plugin/plugin.py | 1 | ||||
-rw-r--r-- | plugins/events_dump/plugin.py | 5 | ||||
-rw-r--r-- | plugins/google_translation/plugin.py | 6 | ||||
-rw-r--r-- | plugins/new_events_example/plugin.py | 5 |
4 files changed, 11 insertions, 6 deletions
diff --git a/plugins/dbus_plugin/plugin.py b/plugins/dbus_plugin/plugin.py index b497ce45c..ac26c3b1d 100644 --- a/plugins/dbus_plugin/plugin.py +++ b/plugins/dbus_plugin/plugin.py @@ -718,6 +718,7 @@ Gajim core but uses new events handling system.''' self.signal_object.remove_from_connection() self.signal_object = None + @log_calls('DBusPlugin') def _set_handling_methods(self): for event_name in self.events_names: setattr(self, event_name, diff --git a/plugins/events_dump/plugin.py b/plugins/events_dump/plugin.py index 4e284aab6..9aa4565b1 100644 --- a/plugins/events_dump/plugin.py +++ b/plugins/events_dump/plugin.py @@ -103,14 +103,15 @@ class EventsDumpPlugin(GajimPlugin): self.events_handlers = {} self._set_handling_methods() - @log_calls('DBusPlugin') + @log_calls('EventsDumpPlugin') def activate(self): pass - @log_calls('DBusPlugin') + @log_calls('EventsDumpPlugin') def deactivate(self): pass + @log_calls('EventsDumpPlugin') def _set_handling_methods(self): for event_name in self.events_names: setattr(self, event_name, diff --git a/plugins/google_translation/plugin.py b/plugins/google_translation/plugin.py index faaf56700..3c5d3a5c1 100644 --- a/plugins/google_translation/plugin.py +++ b/plugins/google_translation/plugin.py @@ -63,6 +63,7 @@ class GoogleTranslationPlugin(GajimPlugin): self.translated_text_re = \ re.compile(r'google.language.callbacks.id100\(\'22\',{"translatedText":"(?P<text>[^"]*)"}, 200, null, 200\)') + @log_calls('GoogleTranslationPlugin') def translate_text(self, text, from_lang, to_lang): text = self.prepare_text_for_url(text) headers = { 'User-Agent' : self.config['user_agent'] } @@ -76,6 +77,7 @@ class GoogleTranslationPlugin(GajimPlugin): return translated_text + @log_calls('GoogleTranslationPlugin') def prepare_text_for_url(self, text): ''' Converts text so it can be used within URL as query to Google Translate. @@ -90,11 +92,11 @@ class GoogleTranslationPlugin(GajimPlugin): return text - @log_calls('DBusPlugin') + @log_calls('GoogleTranslationPlugin') def activate(self): pass - @log_calls('DBusPlugin') + @log_calls('GoogleTranslationPlugin') def deactivate(self): pass diff --git a/plugins/new_events_example/plugin.py b/plugins/new_events_example/plugin.py index 496aef04d..85c97bc21 100644 --- a/plugins/new_events_example/plugin.py +++ b/plugins/new_events_example/plugin.py @@ -81,11 +81,11 @@ class NewEventsExamplePlugin(GajimPlugin): #print "Event '%s' occured. Event object: %s\n\n===\n"%(event_object.name, #event_object - @log_calls('DBusPlugin') + @log_calls('NewEventsExamplePlugin') def activate(self): pass - @log_calls('DBusPlugin') + @log_calls('NewEventsExamplePlugin') def deactivate(self): pass @@ -137,6 +137,7 @@ class EnrichedChatMessageReceivedEvent(nec.NetworkIncomingEvent): self.from_jid = helpers.get_full_jid_from_iq(self.xmpp_msg) self.from_jid_without_resource = gajim.get_jid_without_resource(self.from_jid) self.account = unicode(self.xmpp_msg.attrs['to']) + # FIXME: KeyError: u'vardo@jabber.org/Gajim' self.from_nickname = gajim.get_contact_name_from_jid( self.account, self.from_jid_without_resource) |