destroy htmltextview tooltip when we destroy a chat control. fixes #3545

This commit is contained in:
Yann Leboulanger 2007-11-08 18:47:04 +00:00
parent cc19d02377
commit d1452febce
1 changed files with 5 additions and 0 deletions

View File

@ -913,6 +913,7 @@ class HtmlTextView(gtk.TextView):
self.set_wrap_mode(gtk.WRAP_CHAR)
self.set_editable(False)
self._changed_cursor = False
self.connect('destroy', self.__destroy_event)
self.connect('motion-notify-event', self.__motion_notify_event)
self.connect('leave-notify-event', self.__leave_event)
self.connect('enter-notify-event', self.__motion_notify_event)
@ -923,6 +924,10 @@ class HtmlTextView(gtk.TextView):
# end big hack
build_patterns(self,gajim.config,gajim.interface)
def __destroy_event(self, widget):
if self.tooltip.timeout != 0:
self.tooltip.hide_tooltip()
def __leave_event(self, widget, event):
if self._changed_cursor:
window = widget.get_window(gtk.TEXT_WINDOW_TEXT)