prevent wrong color to be shown when no bgcolor is selected (do the same as in roster)
This commit is contained in:
parent
02d88c5915
commit
8877d45bc5
1 changed files with 9 additions and 5 deletions
|
@ -363,16 +363,16 @@ class GroupchatWindow(chat.Chat):
|
||||||
|
|
||||||
name = nick
|
name = nick
|
||||||
# add status msg, if not empty, under contact name in the treeview
|
# add status msg, if not empty, under contact name in the treeview
|
||||||
if status and gajim.config.get('show_status_msgs_in_roster'):
|
if status and gajim.config.get('show_status_msgs_in_roster'):
|
||||||
status = status.strip()
|
status = status.strip()
|
||||||
if status != '':
|
if status != '':
|
||||||
colorstring = 'dimgrey'
|
colorstring = 'dimgrey'
|
||||||
# escape markup entities and make them small italic and fg color
|
# escape markup entities and make them small italic and fg color
|
||||||
#color = gtkgui_helpers._get_fade_color(self.list_treeview[room_jid],
|
#color = gtkgui_helpers._get_fade_color(self.list_treeview[room_jid],
|
||||||
# selected)
|
# selected)
|
||||||
#colorstring = "#%04x%04x%04x" % (color.red, color.green, color.blue)
|
#colorstring = "#%04x%04x%04x" % (color.red, color.green, color.blue)
|
||||||
name += '\n' '<span size="small" style="italic" foreground="%s">%s</span>'\
|
name += '\n' '<span size="small" style="italic" foreground="%s">%s</span>'\
|
||||||
% (colorstring, gtkgui_helpers.escape_for_pango_markup(status))
|
% (colorstring, gtkgui_helpers.escape_for_pango_markup(status))
|
||||||
|
|
||||||
role_iter = self.get_role_iter(room_jid, role)
|
role_iter = self.get_role_iter(room_jid, role)
|
||||||
if not role_iter:
|
if not role_iter:
|
||||||
|
@ -1529,8 +1529,12 @@ current room topic.') % command, room_jid)
|
||||||
if model.iter_parent(iter):
|
if model.iter_parent(iter):
|
||||||
bgcolor = gajim.config.get_per('themes', theme, 'contactbgcolor')
|
bgcolor = gajim.config.get_per('themes', theme, 'contactbgcolor')
|
||||||
else: # it is root (eg. group)
|
else: # it is root (eg. group)
|
||||||
|
print 'grp'
|
||||||
bgcolor = gajim.config.get_per('themes', theme, 'groupbgcolor')
|
bgcolor = gajim.config.get_per('themes', theme, 'groupbgcolor')
|
||||||
renderer.set_property('cell-background', bgcolor)
|
if bgcolor:
|
||||||
|
renderer.set_property('cell-background', bgcolor)
|
||||||
|
else:
|
||||||
|
renderer.set_property('cell-background', None)
|
||||||
|
|
||||||
def on_list_treeview_button_press_event(self, widget, event):
|
def on_list_treeview_button_press_event(self, widget, event):
|
||||||
'''popup user's group's or agent menu'''
|
'''popup user's group's or agent menu'''
|
||||||
|
|
Loading…
Add table
Reference in a new issue