destroy htmltextview tooltip when we destroy a chat control. fixes #3545
This commit is contained in:
		
							parent
							
								
									cc19d02377
								
							
						
					
					
						commit
						d1452febce
					
				
					 1 changed files with 5 additions and 0 deletions
				
			
		| 
						 | 
					@ -913,6 +913,7 @@ 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('destroy', self.__destroy_event)
 | 
				
			||||||
		self.connect('motion-notify-event', self.__motion_notify_event)
 | 
							self.connect('motion-notify-event', self.__motion_notify_event)
 | 
				
			||||||
		self.connect('leave-notify-event', self.__leave_event)
 | 
							self.connect('leave-notify-event', self.__leave_event)
 | 
				
			||||||
		self.connect('enter-notify-event', self.__motion_notify_event)
 | 
							self.connect('enter-notify-event', self.__motion_notify_event)
 | 
				
			||||||
| 
						 | 
					@ -923,6 +924,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)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue