Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu@sugarlabs.org>2009-05-08 10:37:26 (GMT)
committer Tomeu Vizoso <tomeu@sugarlabs.org>2009-05-08 10:37:26 (GMT)
commit0ef122f427807dbdbc374308909d01b965dedb32 (patch)
tree844071f6561594bfeaa7a8db27f1f5caf766963a
parent9327354ec08ef7c16238a776fed9a91da51178b9 (diff)
Revert "Use the new style Gdk.Screen (part 2)"
This reverts commit f3c7d322cf492760303a2f6643fbe6359d4ef152.
-rw-r--r--src/jarabe/frame/frame.py17
-rw-r--r--src/jarabe/journal/modalalert.py5
2 files changed, 11 insertions, 11 deletions
diff --git a/src/jarabe/frame/frame.py b/src/jarabe/frame/frame.py
index bfe8dd7..b17ded5 100644
--- a/src/jarabe/frame/frame.py
+++ b/src/jarabe/frame/frame.py
@@ -242,19 +242,20 @@ class Frame(object):
panel.connect('leave-notify-event', self._leave_notify_cb)
def _update_position(self):
- screen = Gdk.Screen.get_default()
+ screen_h = gtk.gdk.screen_height()
+ screen_w = gtk.gdk.screen_width()
self._move_panel(self._top_panel, self.current_position,
0, - self._top_panel.size, 0, 0)
self._move_panel(self._bottom_panel, self.current_position,
- 0, screen.height, 0, screen.height - self._bottom_panel.size)
+ 0, screen_h, 0, screen_h - self._bottom_panel.size)
self._move_panel(self._left_panel, self.current_position,
- self._left_panel.size, 0, 0, 0)
self._move_panel(self._right_panel, self.current_position,
- screen.width, 0, screen.width - self._right_panel.size, 0)
+ screen_w, 0, screen_w - self._right_panel.size, 0)
def _size_changed_cb(self, screen):
self._update_position()
@@ -294,16 +295,16 @@ class Frame(object):
window = NotificationWindow()
- screen = Gdk.Screen.get_default()
+ screen = gtk.gdk.screen_get_default()
if corner == gtk.CORNER_TOP_LEFT:
window.move(0, 0)
elif corner == gtk.CORNER_TOP_RIGHT:
- window.move(screen.width - style.GRID_CELL_SIZE, 0)
+ window.move(screen.get_width() - style.GRID_CELL_SIZE, 0)
elif corner == gtk.CORNER_BOTTOM_LEFT:
- window.move(0, screen.height - style.GRID_CELL_SIZE)
+ window.move(0, screen.get_height() - style.GRID_CELL_SIZE)
elif corner == gtk.CORNER_BOTTOM_RIGHT:
- window.move(screen.width - style.GRID_CELL_SIZE,
- screen.height - style.GRID_CELL_SIZE)
+ window.move(screen.get_width() - style.GRID_CELL_SIZE,
+ screen.get_height() - style.GRID_CELL_SIZE)
else:
raise ValueError('Inalid corner: %r' % corner)
diff --git a/src/jarabe/journal/modalalert.py b/src/jarabe/journal/modalalert.py
index ac3d0cf..fe090a6 100644
--- a/src/jarabe/journal/modalalert.py
+++ b/src/jarabe/journal/modalalert.py
@@ -32,9 +32,8 @@ class ModalAlert(gtk.Window):
self.set_border_width(style.LINE_WIDTH)
offset = style.GRID_CELL_SIZE
- screen = Gdk.Screen.get_default()
- width = screen.width - offset * 2
- height = screen.height - offset * 2
+ width = gtk.gdk.screen_width() - offset * 2
+ height = gtk.gdk.screen_height() - offset * 2
self.set_size_request(width, height)
self.set_position(gtk.WIN_POS_CENTER_ALWAYS)
self.set_decorated(False)