Skip to content
Snippets Groups Projects
Commit 7fce5614 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

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

parent b484553f
No related branches found
No related tags found
No related merge requests found
...@@ -910,9 +910,10 @@ class HtmlTextView(gtk.TextView): ...@@ -910,9 +910,10 @@ class HtmlTextView(gtk.TextView):
self.set_wrap_mode(gtk.WRAP_CHAR) self.set_wrap_mode(gtk.WRAP_CHAR)
self.set_editable(False) self.set_editable(False)
self._changed_cursor = False self._changed_cursor = False
self.connect("motion-notify-event", self.__motion_notify_event) self.connect('destroy', self.__destroy_event)
self.connect("leave-notify-event", self.__leave_event) self.connect('motion-notify-event', self.__motion_notify_event)
self.connect("enter-notify-event", self.__motion_notify_event) self.connect('leave-notify-event', self.__leave_event)
self.connect('enter-notify-event', self.__motion_notify_event)
self.get_buffer().create_tag('eol', scale = pango.SCALE_XX_SMALL) self.get_buffer().create_tag('eol', scale = pango.SCALE_XX_SMALL)
self.tooltip = tooltips.BaseTooltip() self.tooltip = tooltips.BaseTooltip()
self.config = gajim.config self.config = gajim.config
...@@ -920,6 +921,10 @@ class HtmlTextView(gtk.TextView): ...@@ -920,6 +921,10 @@ class HtmlTextView(gtk.TextView):
# end big hack # end big hack
build_patterns(self,gajim.config,gajim.interface) 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): def __leave_event(self, widget, event):
if self._changed_cursor: if self._changed_cursor:
window = widget.get_window(gtk.TEXT_WINDOW_TEXT) window = widget.get_window(gtk.TEXT_WINDOW_TEXT)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment