diff options
author | Simon Schampijer <simon@laptop.org> | 2012-10-22 17:04:36 (GMT) |
---|---|---|
committer | Simon Schampijer <simon@laptop.org> | 2012-10-23 09:29:02 (GMT) |
commit | 1224ab145169430dc39b54188840c09a1561bf95 (patch) | |
tree | 2d749a8cc12714c331f81defc765bf996f19c92d | |
parent | 063e40d77da2f46108b5000e9bc48cfb7d167d32 (diff) |
Palettes: move PRIMARY and SECONDARY constant to the base class
Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Manuel QuiƱones <manuq@laptop.org>
-rw-r--r-- | src/sugar3/graphics/palette.py | 3 | ||||
-rw-r--r-- | src/sugar3/graphics/palettewindow.py | 7 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/sugar3/graphics/palette.py b/src/sugar3/graphics/palette.py index fe4440b..efdc9fd 100644 --- a/src/sugar3/graphics/palette.py +++ b/src/sugar3/graphics/palette.py @@ -90,9 +90,6 @@ class Palette(PaletteWindow): display such information. """ - PRIMARY = 0 - SECONDARY = 1 - __gsignals__ = { 'activate': (GObject.SignalFlags.RUN_FIRST, None, ([])), } diff --git a/src/sugar3/graphics/palettewindow.py b/src/sugar3/graphics/palettewindow.py index 3be7fab..5965441 100644 --- a/src/sugar3/graphics/palettewindow.py +++ b/src/sugar3/graphics/palettewindow.py @@ -439,6 +439,9 @@ class PaletteWindow(GObject.GObject): Provides basic management of child widget, invoker, and animation. """ + PRIMARY = 0 + SECONDARY = 1 + __gsignals__ = { 'popup': (GObject.SignalFlags.RUN_FIRST, None, ([])), 'popdown': (GObject.SignalFlags.RUN_FIRST, None, ([])), @@ -628,13 +631,13 @@ class PaletteWindow(GObject.GObject): self.on_invoker_leave() def _invoker_right_click_cb(self, invoker): - self.popup(immediate=True, state=1) + self.popup(immediate=True, state=self.SECONDARY) def _invoker_toggle_state_cb(self, invoker): if self.is_up(): self.popdown(immediate=True) else: - self.popup(immediate=True, state=1) + self.popup(immediate=True, state=self.SECONDARY) def __enter_notify_cb(self, widget): self.on_enter() |