Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Drake <dsd@laptop.org>2011-10-30 08:49:49 (GMT)
committer Daniel Drake <dsd@laptop.org>2011-10-30 09:23:50 (GMT)
commit1472ef39177b6f7f4a776d1fc129b00ce0d225b9 (patch)
tree3e8be15b36a8a412f5294ec77a1c5c4513c147a1
parent1da4b0d6849b90ade07f74e437387a68e28d8ec6 (diff)
get_window() fixes
-rw-r--r--src/sugar3/activity/activity.py4
-rw-r--r--src/sugar3/activity/namingalert.py2
-rw-r--r--src/sugar3/graphics/palettewindow.py10
-rw-r--r--src/sugar3/graphics/toolbarbox.py6
-rw-r--r--src/sugar3/graphics/window.py8
5 files changed, 15 insertions, 15 deletions
diff --git a/src/sugar3/activity/activity.py b/src/sugar3/activity/activity.py
index 3e942d4..6e23b14 100644
--- a/src/sugar3/activity/activity.py
+++ b/src/sugar3/activity/activity.py
@@ -924,8 +924,8 @@ class Activity(Window, Gtk.Container):
self.reveal()
def __realize_cb(self, window):
- wm.set_bundle_id(window.window, self.get_bundle_id())
- wm.set_activity_id(window.window, str(self._activity_id))
+ wm.set_bundle_id(window.get_window(), self.get_bundle_id())
+ wm.set_activity_id(window.get_window(), str(self._activity_id))
def __delete_event_cb(self, widget, event):
self.close()
diff --git a/src/sugar3/activity/namingalert.py b/src/sugar3/activity/namingalert.py
index 251b40b..241df5e 100644
--- a/src/sugar3/activity/namingalert.py
+++ b/src/sugar3/activity/namingalert.py
@@ -281,7 +281,7 @@ class NamingAlert(Gtk.Window):
def __realize_cb(self, widget):
self.set_type_hint(Gdk.WindowTypeHint.DIALOG)
- self.window.set_accept_focus(True)
+ self.get_window().set_accept_focus(True)
def __keep_cb(self, widget):
if self._favorite_icon.get_active():
diff --git a/src/sugar3/graphics/palettewindow.py b/src/sugar3/graphics/palettewindow.py
index 57d7932..82c434a 100644
--- a/src/sugar3/graphics/palettewindow.py
+++ b/src/sugar3/graphics/palettewindow.py
@@ -386,7 +386,7 @@ class PaletteWindow(Gtk.Window):
self.emit('popdown')
def get_rect(self):
- win_x, win_y = self.window.get_origin()
+ win_x, win_y = self.get_window().get_origin()
rectangle = self.get_allocation()
x = win_x + rectangle.x
@@ -715,8 +715,8 @@ class WidgetInvoker(Invoker):
def get_rect(self):
allocation = self._widget.get_allocation()
- if self._widget.window is not None:
- x, y = self._widget.window.get_origin()
+ if self._widget.get_window() is not None:
+ x, y = self._widget.get_window().get_origin()
else:
logging.warning(
"Trying to position palette with invoker that's not realized.")
@@ -896,8 +896,8 @@ class CellRendererInvoker(Invoker):
def get_rect(self):
allocation = self._tree_view.get_allocation()
- if self._tree_view.window is not None:
- x, y = self._tree_view.window.get_origin()
+ if self._tree_view.get_window() is not None:
+ x, y = self._tree_view.get_window().get_origin()
else:
logging.warning(
"Trying to position palette with invoker that's not realized.")
diff --git a/src/sugar3/graphics/toolbarbox.py b/src/sugar3/graphics/toolbarbox.py
index b3ce73a..6bbf110 100644
--- a/src/sugar3/graphics/toolbarbox.py
+++ b/src/sugar3/graphics/toolbarbox.py
@@ -117,9 +117,9 @@ class ToolbarButton(ToolButton):
self.props.palette.add(self.page_widget)
def _unparent(self):
- if self.page_widget.parent is None:
- return
- self.page_widget.parent.remove(self.page_widget)
+ parent = self.page_widget.get_parent()
+ if parent:
+ parent.remove(self.page_widget)
# FIXME: Need to fix drawing ...
# def do_expose_event(self, event):
diff --git a/src/sugar3/graphics/window.py b/src/sugar3/graphics/window.py
index 3f6ee5b..ce0d845 100644
--- a/src/sugar3/graphics/window.py
+++ b/src/sugar3/graphics/window.py
@@ -127,13 +127,13 @@ class Window(Gtk.Window):
even after invoking on response on non-gtk events.
See #1423.
"""
- if self.window is None:
+ if self.get_window() is None:
self.show()
return
timestamp = Gtk.get_current_event_time()
if not timestamp:
- timestamp = GdkX11.get_server_time(self.window)
- self.window.focus(timestamp)
+ timestamp = GdkX11.get_server_time(self.get_window())
+ self.get_window().focus(timestamp)
def fullscreen(self):
palettegroup.popdown_all()
@@ -240,7 +240,7 @@ class Window(Gtk.Window):
def __window_realize_cb(self, window):
group = Gtk.Window()
group.realize()
- window.window.set_group(group.window)
+ window.get_window().set_group(group.get_window())
def __key_press_cb(self, widget, event):
key = Gdk.keyval_name(event.keyval)