Remove redundant state argument from PaletteWindow.popup
This commit is contained in:
parent
e799649f2f
commit
7d76f06ae1
@ -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 \
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user