Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu@tomeuvizoso.net>2007-07-01 10:31:23 (GMT)
committer Tomeu Vizoso <tomeu@tomeuvizoso.net>2007-07-01 10:31:23 (GMT)
commitaa5d6af260ce93495fd7bb9d19a094106c331e98 (patch)
tree5373ad2eba04035ee5bb8da53b8d7adc969c32b1
parente9145f07244327e610e5c7331a5d92c3e5271d7c (diff)
Two more small palette fixes.
-rw-r--r--sugar/graphics/palette.py6
1 files changed, 3 insertions, 3 deletions
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,