gtk.gdk.WINDOW_TYPE_HINT_TOOLTIP only exists in gtk >= 2.10. fixes #3484
This commit is contained in:
parent
4187f57eca
commit
5fe9126101
|
@ -2038,7 +2038,8 @@ class ChatControl(ChatControlBase):
|
|||
# so this line adds that
|
||||
window.set_events(gtk.gdk.POINTER_MOTION_MASK)
|
||||
window.set_app_paintable(True)
|
||||
window.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_TOOLTIP)
|
||||
if gtk.gtk_version >= (2, 10, 0) and gtk.pygtk_version >= (2, 10, 0):
|
||||
window.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_TOOLTIP)
|
||||
|
||||
window.realize()
|
||||
window.window.set_back_pixmap(pixmap, False) # make it transparent
|
||||
|
|
|
@ -64,7 +64,8 @@ class BaseTooltip:
|
|||
self.win.set_border_width(3)
|
||||
self.win.set_resizable(False)
|
||||
self.win.set_name('gtk-tooltips')
|
||||
self.win.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_TOOLTIP)
|
||||
if gtk.gtk_version >= (2, 10, 0) and gtk.pygtk_version >= (2, 10, 0):
|
||||
self.win.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_TOOLTIP)
|
||||
|
||||
self.win.set_events(gtk.gdk.POINTER_MOTION_MASK)
|
||||
self.win.connect_after('expose_event', self.expose)
|
||||
|
|
Loading…
Reference in New Issue