From d1452febce232b5a66be5590d577761535c256a8 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Thu, 8 Nov 2007 18:47:04 +0000 Subject: [PATCH] destroy htmltextview tooltip when we destroy a chat control. fixes #3545 --- src/htmltextview.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/htmltextview.py b/src/htmltextview.py index f9e6178ec..a274d7274 100644 --- a/src/htmltextview.py +++ b/src/htmltextview.py @@ -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)