[gnome-games/gnome-3-0] sodoku: gi port, hack around gdk_window_get_origin



commit 0c12923e6aa1838308e4f46f41748dec7676491d
Author: John Stowers <john stowers gmail com>
Date:   Sat Apr 30 10:11:27 2011 +1200

    sodoku: gi port, hack around gdk_window_get_origin

 gnome-sudoku/src/lib/number_box.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gnome-sudoku/src/lib/number_box.py b/gnome-sudoku/src/lib/number_box.py
index aedcf25..bd73c0b 100644
--- a/gnome-sudoku/src/lib/number_box.py
+++ b/gnome-sudoku/src/lib/number_box.py
@@ -308,7 +308,7 @@ class NumberBox (Gtk.DrawingArea):
         e.connect('focus-out-event', lambda e, ev, w: w.destroy(), w)
         e.connect('focus-out-event', self.note_focus_out)
         e.connect('activate', lambda e, w: w.destroy(), w)
-        x, y = self.get_window().get_origin()
+        _, x, y = self.get_window().get_origin()
         if top:
             w.move(x, y)
         else:
@@ -330,12 +330,12 @@ class NumberBox (Gtk.DrawingArea):
         ns.connect('changed', self.number_changed_cb)
         w.grab_focus()
         w.add(ns)
-        my_origin = self.get_window().get_origin()
+        _, xorigin, yorigin = self.get_window().get_origin()
         x, y = (self.get_allocated_width(), self.get_allocated_height())
         popupx, popupy = w.get_size()
         overlapx = popupx-x
         overlapy = popupy-y
-        w.move(my_origin[1]-(overlapx/2), my_origin[2]-(overlapy/2))
+        w.move(xorigin - (overlapx/2), yorigin - (overlapy/2))
         w.show()
         self.npicker = w
 



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