From e88d547ed963a9992f7a7336cbdb47ff05248baa Mon Sep 17 00:00:00 2001 From: Stephan Erb Date: Wed, 27 Jun 2007 09:26:58 +0000 Subject: [PATCH] See [8324]: do the same in groupchats. Comment added --- src/groupchat_control.py | 6 ++++++ src/roster_window.py | 1 + 2 files changed, 7 insertions(+) diff --git a/src/groupchat_control.py b/src/groupchat_control.py index 76833ed87..bde69c137 100644 --- a/src/groupchat_control.py +++ b/src/groupchat_control.py @@ -63,6 +63,12 @@ def tree_cell_data_func(column, renderer, model, iter, tv=None): # cell data func is global, because we don't want it to keep # reference to GroupchatControl instance (self) theme = gajim.config.get('roster_theme') + # allocate space for avatar only if needed + if isinstance(renderer, gtk.CellRendererPixbuf): + if model[iter][C_AVATAR]: + renderer.set_property('visible', True) + else: + renderer.set_property('visible', False) if model.iter_parent(iter): bgcolor = gajim.config.get_per('themes', theme, 'contactbgcolor') if bgcolor: diff --git a/src/roster_window.py b/src/roster_window.py index 79b644593..b15dea360 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -4468,6 +4468,7 @@ class RosterWindow: padlock)''' theme = gajim.config.get('roster_theme') type_ = model[iter][C_TYPE] + # allocate space for the icon only if needed if model[iter][C_SECPIXBUF]: renderer.set_property('visible', True) else: