[gnome-games] Update tooltip style for info messages (copied from GEdit again)



commit 042220fce6868a86daffbc2d1873a354bb81db90
Author: Robert Ancell <robert ancell gmail com>
Date:   Tue May 19 15:17:35 2009 +0200

    Update tooltip style for info messages (copied from GEdit again)
---
 glchess/src/lib/gtkui/gtkui.py |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/glchess/src/lib/gtkui/gtkui.py b/glchess/src/lib/gtkui/gtkui.py
index 867c5d4..d1b523d 100644
--- a/glchess/src/lib/gtkui/gtkui.py
+++ b/glchess/src/lib/gtkui/gtkui.py
@@ -203,13 +203,10 @@ class GtkUI(glchess.ui.UI):
         # Set the message panel to the tooltip style
         # (copied from Gedit)
         # In Gtk+ 2.11+ (I think) tip_window is now private so skip if it's not there (bug #459740)
-        tooltip = gtk.Tooltips()
-        tooltip.force_window()
-        if hasattr(tooltip, 'tip_window') and tooltip.tip_window != None:
-            tooltip.tip_window.ensure_style()
-            self._tooltipStyle = tooltip.tip_window.get_style()
-        else:
-            self._tooltipStyle = None
+        w = gtk.Window(gtk.WINDOW_POPUP)
+        w.set_name('gtk-tooltip')
+        w.ensure_style()
+        self._tooltipStyle = w.get_style()
         self._tooltipWidgetsDrawn = {}
         
         self._gui = loadUIFile('glchess.ui')



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]