From 1224ab145169430dc39b54188840c09a1561bf95 Mon Sep 17 00:00:00 2001 From: Simon Schampijer Date: Mon, 22 Oct 2012 19:04:36 +0200 Subject: [PATCH] Palettes: move PRIMARY and SECONDARY constant to the base class MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Simon Schampijer Acked-by: Manuel QuiƱones --- src/sugar3/graphics/palette.py | 3 --- 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 fe4440b7..efdc9fd8 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 3be7fab8..59654419 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()