__init__.py broken Tooltip

Bug #367303 reported by Vincent Mussard
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Screenlets
Confirmed
Medium
Unassigned

Bug Description

I think I find a bug in the screenlet Tooltip class.
In line 2478/2479 of __init__.py, in the cancel_show function of Tooltip :

   def cancel_show (self):
       """Cancel showing of the Notify."""
       if self.__timeout:
           gobject.source_remove(self.__timeout)
           self.p_context = None
           self.p_layout = None

self.p_context and self.p_layout is setted to None but never renewed, so the tooltip is not working.
I suggest to remove both lines.

And on line 2152 :

 def hide (self):
  """Hide the Tooltip window."""
  self.cancel_show()
  self.window.destroy() <= must be replaced by a self.window.hide()

Thanks

Revision history for this message
Märt Põder (boamaod) wrote :

You are talking about Tooltip class, but one of your examples is from Notify class. Does it mean that the bug exists in both classes?

Anyway, the Tooltip class is highly problematic in Screenlets because it doesn't follow the system color scheme and doesn't display even render the text all right (for example in FeedReader the backgound of the text is transparent making the tooltip window broken). Ideas how to fix the problems are welcome.

Changed in screenlets:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Vincent Mussard (frodon-wanadoo) wrote :

Yes you are right. It was only about Tooltip class. I didn't notice anything about the Notify class.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.