From f4cae17d9fceba60cf045fc01843343b6cfe99df Mon Sep 17 00:00:00 2001
From: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Date: Wed, 13 Dec 2017 23:19:16 +0100
Subject: [PATCH] =?UTF-8?q?Remove=20support=20for=20AWN,=20which=20isn?=
 =?UTF-8?q?=E2=80=99t=20maintained=20anymore?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 gajim/gui_interface.py | 27 ---------------------------
 gajim/roster_window.py |  1 -
 2 files changed, 28 deletions(-)

diff --git a/gajim/gui_interface.py b/gajim/gui_interface.py
index 2cceea5755..e65a2bd4bc 100644
--- a/gajim/gui_interface.py
+++ b/gajim/gui_interface.py
@@ -2185,33 +2185,6 @@ class Interface:
 ################################################################################
 
 
-    @staticmethod
-    def change_awn_icon_status(status):
-        if not dbus_support.supported:
-            # do nothing if user doesn't have D-Bus bindings
-            return
-        try:
-            bus = dbus.SessionBus()
-            if not 'com.google.code.Awn' in bus.list_names():
-                # Awn is not installed
-                return
-        except Exception:
-            return
-        iconset = app.config.get('iconset')
-        prefix = os.path.join(helpers.get_iconset_path(iconset), '32x32')
-        if status in ('chat', 'away', 'xa', 'dnd', 'invisible', 'offline'):
-            status = status + '.png'
-        elif status == 'online':
-            prefix = ''
-            status = gtkgui_helpers.get_icon_path('org.gajim.Gajim', 32)
-        path = os.path.join(prefix, status)
-        try:
-            obj = bus.get_object('com.google.code.Awn', '/com/google/code/Awn')
-            awn = dbus.Interface(obj, 'com.google.code.Awn')
-            awn.SetTaskIconByName('Gajim', os.path.abspath(path))
-        except Exception:
-            pass
-
     def enable_music_listener(self):
         listener = MusicTrackListener.get()
         if not self.music_track_changed_signal:
diff --git a/gajim/roster_window.py b/gajim/roster_window.py
index 47c19a112e..4bc8265da4 100644
--- a/gajim/roster_window.py
+++ b/gajim/roster_window.py
@@ -2335,7 +2335,6 @@ class RosterWindow:
             liststore.prepend([status_combobox_text,
                 app.interface.jabber_state_images['16'][show], show, False])
             self.status_combobox.set_active(0)
-        app.interface.change_awn_icon_status(show)
         self.combobox_callback_active = True
         if app.interface.systray_enabled:
             app.interface.systray.change_status(show)
-- 
GitLab