From 8c7e40fdafada118d8adfb09a0e02c65c4f00192 Mon Sep 17 00:00:00 2001 From: Michael Kainer Date: Mon, 25 Oct 2010 22:06:07 +0200 Subject: [PATCH 1/3] Removed empty setting dialog --- ubuntu_integration/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ubuntu_integration/plugin.py b/ubuntu_integration/plugin.py index e755335..25f55a4 100644 --- a/ubuntu_integration/plugin.py +++ b/ubuntu_integration/plugin.py @@ -49,7 +49,7 @@ class UbuntuIntegrationPlugin(GajimPlugin): """ Does nothing. """ - pass + self.config_dialog = None @log_calls("UbuntuIntegrationPlugin") def activate(self): From c8da36b94cddfae99680f22f47b14adefb4a8120 Mon Sep 17 00:00:00 2001 From: Michael Kainer Date: Tue, 26 Oct 2010 10:52:34 +0200 Subject: [PATCH 2/3] Avatars in the Messaging Menu --- ubuntu_integration/plugin.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ubuntu_integration/plugin.py b/ubuntu_integration/plugin.py index 25f55a4..3364a91 100644 --- a/ubuntu_integration/plugin.py +++ b/ubuntu_integration/plugin.py @@ -26,6 +26,7 @@ from plugins.plugin import GajimPluginException from plugins.helpers import log, log_calls from common import ged from common import gajim +import gtkgui_helpers # 3rd party try: import indicate @@ -143,6 +144,10 @@ class UbuntuIntegrationPlugin(GajimPlugin): indicator.set_property("name", contact) indicator.set_property_time("time", when) indicator.set_property_bool("draw-attention", True); + if gajim.config.get("show_avatars_in_roster"): + pixbuf = gtkgui_helpers.get_avatar_pixbuf_from_cache(jid) + if pixbuf not in (None, "ask"): + indicator.set_property_icon("icon", pixbuf) indicator.connect("user-display", self.on_indicator_activate) indicator.show() indicator.key = key From 9ea8b8bf1a327c4f0e24379afe532a1a03095be1 Mon Sep 17 00:00:00 2001 From: Michael Kainer Date: Tue, 26 Oct 2010 11:11:35 +0200 Subject: [PATCH 3/3] Moved key up --- ubuntu_integration/plugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ubuntu_integration/plugin.py b/ubuntu_integration/plugin.py index 3364a91..7f67ec0 100644 --- a/ubuntu_integration/plugin.py +++ b/ubuntu_integration/plugin.py @@ -9,7 +9,7 @@ TODO: * permanent integration into the messaging menu after quitting gajim * show/hide gajim on root menu entry * switch workspace on click on events -* pictures in the menu +* corrent group chat handling * hide gajim if the plugin is disabled :author: Michael Kainer @@ -113,6 +113,7 @@ class UbuntuIntegrationPlugin(GajimPlugin): jid = event.jid when = time.time() contact = "" + key = (account, jid) # Check if the event is valid and modify the variables if event.type_ == "chat" or \ @@ -138,7 +139,6 @@ class UbuntuIntegrationPlugin(GajimPlugin): print account, jid, when, contact # Add a new indicator if necessary - key = (account, jid) if not self.events.has_key(key): indicator = indicate.Indicator() indicator.set_property("name", contact)