From aa5d6af260ce93495fd7bb9d19a094106c331e98 Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Sun, 01 Jul 2007 10:31:23 +0000 Subject: Two more small palette fixes. --- diff --git a/sugar/graphics/palette.py b/sugar/graphics/palette.py index 72e8af9..be540c2 100644 --- a/sugar/graphics/palette.py +++ b/sugar/graphics/palette.py @@ -84,7 +84,7 @@ class Palette(gobject.GObject): self._menu.connect('button-press-event', self._button_press_event_cb) - def set_primary_text(self, label, accel_path): + def set_primary_text(self, label, accel_path=None): self._primary.set_label(label, accel_path) def append_menu_item(self, item): @@ -161,10 +161,10 @@ class Palette(gobject.GObject): [width, height] = self._menu.size_request() screen_width = gtk.gdk.screen_width() - units.grid_to_pixels(1) screen_height = gtk.gdk.screen_height() - units.grid_to_pixels(1) - + return x + width <= screen_width and \ y + height <= screen_height and \ - x >= 0 and y >= 0 + x >= units.grid_to_pixels(1) and y >= units.grid_to_pixels(1) def _get_automatic_position(self): alignments = [ _BOTTOM_LEFT, _BOTTOM_RIGHT, -- cgit v0.9.1