Skip to content

Commit

Permalink
1.Optimize set menu.
Browse files Browse the repository at this point in the history
  • Loading branch information
HsOjo committed Sep 28, 2019
1 parent 861e040 commit ac4bd96
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/base/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ def inject_menus(self):
setattr(self, key, self.menu[k]['object'])

def set_menu_title(self, name, title):
self.app.menu[name].title = title
menu = self.app.menu[name] # type: rumps.MenuItem
if menu.title != title:
menu.title = title

def set_menu_callback(self, key, callback=None):
if not isinstance(key, str):
Expand Down

0 comments on commit ac4bd96

Please sign in to comment.