Skip to content

Commit

Permalink
Merge pull request #322 from takluyver/fix-go-menu
Browse files Browse the repository at this point in the history
Fix switching windows with the 'Go' menu
  • Loading branch information
cydanil authored Nov 21, 2020
2 parents 1b50cce + 60e1ac8 commit ed1013b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/gourmet/GourmetRecipeManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def go_menu (self):
separator.show()
for rc in list(self.rc.values()):
i=Gtk.MenuItem("_%s"%rc.current_rec.title)
i.connect('activate',rc.show)
i.connect('activate', lambda *args: rc.show())
m.append(i)
i.show()
return m
Expand Down Expand Up @@ -228,8 +228,9 @@ def update_action_group(self):

existing_action = self.goActionGroup.get_action(action_name)
if not existing_action:
self.goActionGroup.add_actions([(action_name, None, title,
None, None, rc.show)])
self.goActionGroup.add_actions([(
action_name, None, title, None, None, lambda *args: rc.show()
)])
else:
existing_action.set_property('label', title)

Expand Down

0 comments on commit ed1013b

Please sign in to comment.