gtk.gdk.WINDOW_TYPE_HINT_TOOLTIP only exists in gtk >= 2.10. fixes #3484

This commit is contained in:
Yann Leboulanger 2007-10-07 14:26:25 +00:00
parent 4187f57eca
commit 5fe9126101
2 changed files with 4 additions and 2 deletions

View File

@ -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

View File

@ -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)