banner_tweaks plugin. prevent Tb in the gc if 'show_banner_image' is disabled

This commit is contained in:
Denis Fomin 2011-05-21 23:17:17 +04:00
parent 56ef560510
commit d638922384
1 changed files with 6 additions and 1 deletions

View File

@ -79,7 +79,12 @@ class BannerTweaksPlugin(GajimPlugin):
chat_control.banner_status_label.set_markup(status_text)
if not self.config['show_banner_image']:
banner_status_img = chat_control.xml.get_object('banner_status_image')
if chat_control.type_id == 'chat':
banner_status_img = chat_control.xml.get_object(
'banner_status_image')
else:
banner_status_img = chat_control.xml.get_object(
'gc_banner_status_image')
banner_status_img.clear()
# TODO: part below repeats a lot of code from ChatControl.draw_banner_text()