do not del print_time_timeout_id but set it to None. fixes #1691

This commit is contained in:
Nikos Kouremenos 2006-03-13 23:59:59 +00:00
parent 0c6606c514
commit e650cf3308
3 changed files with 4 additions and 3 deletions

View File

@ -493,7 +493,7 @@ class ChatControlBase(MessageControl):
conv_textview.scroll_to_end()
return True # loop again
if self.print_time_timeout_id:
del self.print_time_timeout_id
self.print_time_timeout_id = None
return False
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)
if self.print_time_timeout_id:
gobject.source_remove(self.print_time_timeout_id)
self.print_time_timeout_id = None
# Clean up systray
if gajim.interface.systray_enabled and self.nb_unread > 0:
gajim.interface.systray.remove_jid(self.contact.jid, self.account,

View File

@ -97,7 +97,7 @@ class MessageControl:
# NOTE: Derived classes SHOULD implement this
if 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
def get_tab_label(self, chatstate):

View File

@ -396,7 +396,7 @@ class MessageWindow:
for ctrl in self.controls():
if 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:
for ctrl in self.controls():
if not ctrl.print_time_timeout_id: