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)