remove has_focus var and focus_out cb that are not needed
This commit is contained in:
parent
cc260e3734
commit
eda58198e2
|
@ -190,7 +190,7 @@ class Chat:
|
||||||
if chatstate == 'composing':
|
if chatstate == 'composing':
|
||||||
color = gajim.config.get_per('themes', theme,
|
color = gajim.config.get_per('themes', theme,
|
||||||
'state_composing_color')
|
'state_composing_color')
|
||||||
elif unread and self.has_focus:
|
elif unread and self.window.get_property('has-toplevel-focus')::
|
||||||
color = gajim.config.get_per('themes', theme,
|
color = gajim.config.get_per('themes', theme,
|
||||||
'state_active_color')
|
'state_active_color')
|
||||||
elif unread:
|
elif unread:
|
||||||
|
@ -267,12 +267,8 @@ class Chat:
|
||||||
self.plugin.windows['logs'][jid] = history_window.HistoryWindow(
|
self.plugin.windows['logs'][jid] = history_window.HistoryWindow(
|
||||||
self.plugin, jid, self.account)
|
self.plugin, jid, self.account)
|
||||||
|
|
||||||
def on_chat_window_focus_out_event(self, widget, event):
|
|
||||||
self.has_focus = False
|
|
||||||
|
|
||||||
def on_chat_window_focus_in_event(self, widget, event):
|
def on_chat_window_focus_in_event(self, widget, event):
|
||||||
"""When window gets focus"""
|
"""When window gets focus"""
|
||||||
self.has_focus = True
|
|
||||||
jid = self.get_active_jid()
|
jid = self.get_active_jid()
|
||||||
|
|
||||||
textview = self.xmls[jid].get_widget('conversation_textview')
|
textview = self.xmls[jid].get_widget('conversation_textview')
|
||||||
|
|
Loading…
Reference in New Issue