do not del print_time_timeout_id but set it to None. fixes #1691
This commit is contained in:
parent
0c6606c514
commit
e650cf3308
3 changed files with 4 additions and 3 deletions
|
@ -493,7 +493,7 @@ class ChatControlBase(MessageControl):
|
||||||
conv_textview.scroll_to_end()
|
conv_textview.scroll_to_end()
|
||||||
return True # loop again
|
return True # loop again
|
||||||
if self.print_time_timeout_id:
|
if self.print_time_timeout_id:
|
||||||
del self.print_time_timeout_id
|
self.print_time_timeout_id = None
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def _on_history_menuitem_activate(self, widget = None, jid = None):
|
def _on_history_menuitem_activate(self, widget = None, jid = None):
|
||||||
|
@ -1245,6 +1245,7 @@ class ChatControl(ChatControlBase):
|
||||||
gobject.source_remove(self.possible_inactive_timeout_id)
|
gobject.source_remove(self.possible_inactive_timeout_id)
|
||||||
if self.print_time_timeout_id:
|
if self.print_time_timeout_id:
|
||||||
gobject.source_remove(self.print_time_timeout_id)
|
gobject.source_remove(self.print_time_timeout_id)
|
||||||
|
self.print_time_timeout_id = None
|
||||||
# Clean up systray
|
# Clean up systray
|
||||||
if gajim.interface.systray_enabled and self.nb_unread > 0:
|
if gajim.interface.systray_enabled and self.nb_unread > 0:
|
||||||
gajim.interface.systray.remove_jid(self.contact.jid, self.account,
|
gajim.interface.systray.remove_jid(self.contact.jid, self.account,
|
||||||
|
|
|
@ -97,7 +97,7 @@ class MessageControl:
|
||||||
# NOTE: Derived classes SHOULD implement this
|
# NOTE: Derived classes SHOULD implement this
|
||||||
if self.print_time_timeout_id:
|
if self.print_time_timeout_id:
|
||||||
gobject.source_remove(self.print_time_timeout_id)
|
gobject.source_remove(self.print_time_timeout_id)
|
||||||
del self.print_time_timeout_id
|
self.print_time_timeout_id = None
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def get_tab_label(self, chatstate):
|
def get_tab_label(self, chatstate):
|
||||||
|
|
|
@ -396,7 +396,7 @@ class MessageWindow:
|
||||||
for ctrl in self.controls():
|
for ctrl in self.controls():
|
||||||
if ctrl.print_time_timeout_id:
|
if ctrl.print_time_timeout_id:
|
||||||
gobject.source_remove(ctrl.print_time_timeout_id)
|
gobject.source_remove(ctrl.print_time_timeout_id)
|
||||||
del ctrl.print_time_timeout_id
|
ctrl.print_time_timeout_id = None
|
||||||
else:
|
else:
|
||||||
for ctrl in self.controls():
|
for ctrl in self.controls():
|
||||||
if not ctrl.print_time_timeout_id:
|
if not ctrl.print_time_timeout_id:
|
||||||
|
|
Loading…
Add table
Reference in a new issue