From 12bede65b05363cfa41bcf8e8ddc1f3b0128374b Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Fri, 22 Jun 2007 20:42:01 +0000 Subject: [PATCH] use opened_meta.png and closed_meta.png to create meta contacts icons in roster if they exists, else fall back to opened.png and closed.png. Fixes #1974 --- src/roster_window.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/roster_window.py b/src/roster_window.py index 539907b80..e2fc6730a 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -4268,9 +4268,23 @@ class RosterWindow: path = os.path.join(gajim.DATA_DIR, 'iconsets', iconset, '16x16') self.jabber_state_images['16'] = self.load_iconset(path) - pixo = gtk.gdk.pixbuf_new_from_file(os.path.join(path, 'opened.png')) + # try to find opened_meta.png file, else opened.png else nopixbuf merge + path_opened = os.path.join(path, 'opened_meta.png') + if not os.path.isfile(path_opened): + path_opened = os.path.join(path, 'opened.png') + if os.path.isfile(path_opened): + pixo = gtk.gdk.pixbuf_new_from_file(path_opened)) + else: + pixo = None self.jabber_state_images['opened'] = self.load_iconset(path, pixo) - pixc = gtk.gdk.pixbuf_new_from_file(os.path.join(path, 'closed.png')) + # Same thing for closed + path_closed = os.path.join(path, 'opened_meta.png') + if not os.path.isfile(path_closed): + path_closed = os.path.join(path, 'closed.png') + if os.path.isfile(path_closed): + pixc = gtk.gdk.pixbuf_new_from_file(path_closed)) + else: + pixc = None self.jabber_state_images['closed'] = self.load_iconset(path, pixc) if gajim.config.get('use_transports_iconsets'):