diff --git a/src/sugar/graphics/palette.py b/src/sugar/graphics/palette.py index 2a3b6c6b..92b04b65 100644 --- a/src/sugar/graphics/palette.py +++ b/src/sugar/graphics/palette.py @@ -318,7 +318,7 @@ class PaletteWindow(gtk.Window): def get_full_size_request(self): return self.size_request() - def popup(self, immediate=False, state=None): + def popup(self, immediate=False): if self._invoker is not None: full_size_request = self.get_full_size_request() self._alignment = self._invoker.get_alignment(full_size_request) @@ -365,7 +365,7 @@ class PaletteWindow(gtk.Window): self.on_invoker_leave() def _invoker_right_click_cb(self, invoker): - self.popup(immediate=True, state=self.SECONDARY) + self.popup(immediate=True) def __enter_notify_event_cb(self, widget, event): if event.detail != gtk.gdk.NOTIFY_INFERIOR and \ diff --git a/src/sugar/graphics/toolbarbox.py b/src/sugar/graphics/toolbarbox.py index 93c24960..54de2bd4 100644 --- a/src/sugar/graphics/toolbarbox.py +++ b/src/sugar/graphics/toolbarbox.py @@ -93,6 +93,7 @@ class ToolbarButton(ToolButton): return if box.expanded_button is not None: + # need to redraw it to erase arrow expanded_toolitem = box.expanded_button.page_widget.toolbar_button if expanded_toolitem.window is not None: expanded_toolitem.window.invalidate_rect(None, True) @@ -216,14 +217,14 @@ class _ToolbarPalette(PaletteWindow): requisition.width = max(requisition.width, gtk.gdk.screen_width()) - def popup(self, immediate=False, state=None): + def popup(self, immediate=False): button = self.toolbar_button if button.is_expanded(): return box = button.toolbar_box _setup_page(button.page_widget, style.COLOR_BLACK.get_gdk_color(), box.props.padding) - PaletteWindow.popup(self, immediate, state) + PaletteWindow.popup(self, immediate) def __group_popdown_cb(self, group): if self._focus == 0: