Do not set tab to active color when we shouldn't, fix bug in [6914]
This commit is contained in:
parent
0b54816178
commit
ee7b16c405
|
@ -1283,7 +1283,7 @@ class ChatControl(ChatControlBase):
|
||||||
if chatstate in ('inactive', 'gone') and\
|
if chatstate in ('inactive', 'gone') and\
|
||||||
self.parent_win.get_active_control() != self:
|
self.parent_win.get_active_control() != self:
|
||||||
color = self.lighten_color(color)
|
color = self.lighten_color(color)
|
||||||
else: # active or no chatstate
|
elif chatstate == 'active' : # active, get color from gtk
|
||||||
color = self.parent_win.notebook.style.fg[gtk.STATE_ACTIVE]
|
color = self.parent_win.notebook.style.fg[gtk.STATE_ACTIVE]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -363,22 +363,23 @@ class GroupchatControl(ChatControlBase):
|
||||||
|
|
||||||
has_focus = self.parent_win.window.get_property('has-toplevel-focus')
|
has_focus = self.parent_win.window.get_property('has-toplevel-focus')
|
||||||
current_tab = self.parent_win.get_active_control() == self
|
current_tab = self.parent_win.get_active_control() == self
|
||||||
|
color_name = None
|
||||||
color = None
|
color = None
|
||||||
theme = gajim.config.get('roster_theme')
|
theme = gajim.config.get('roster_theme')
|
||||||
if chatstate == 'attention' and (not has_focus or not current_tab):
|
if chatstate == 'attention' and (not has_focus or not current_tab):
|
||||||
self.attention_flag = True
|
self.attention_flag = True
|
||||||
color = gajim.config.get_per('themes', theme,
|
color_name = gajim.config.get_per('themes', theme,
|
||||||
'state_muc_directed_msg_color')
|
'state_muc_directed_msg_color')
|
||||||
elif chatstate:
|
elif chatstate:
|
||||||
if chatstate == 'active' or (current_tab and has_focus):
|
if chatstate == 'active' or (current_tab and has_focus):
|
||||||
self.attention_flag = False
|
self.attention_flag = False
|
||||||
|
# get active color from gtk
|
||||||
|
color = self.parent_win.notebook.style.fg[gtk.STATE_ACTIVE]
|
||||||
elif chatstate == 'newmsg' and (not has_focus or not current_tab) and\
|
elif chatstate == 'newmsg' and (not has_focus or not current_tab) and\
|
||||||
not self.attention_flag:
|
not self.attention_flag:
|
||||||
color = gajim.config.get_per('themes', theme, 'state_muc_msg_color')
|
color_name = gajim.config.get_per('themes', theme, 'state_muc_msg_color')
|
||||||
if color:
|
if color_name:
|
||||||
color = gtk.gdk.colormap_get_system().alloc_color(color)
|
color = gtk.gdk.colormap_get_system().alloc_color(color_name)
|
||||||
else:
|
|
||||||
color = self.parent_win.notebook.style.fg[gtk.STATE_ACTIVE]
|
|
||||||
|
|
||||||
label_str = self.name
|
label_str = self.name
|
||||||
return (label_str, color)
|
return (label_str, color)
|
||||||
|
|
Loading…
Reference in New Issue