From 27788f7a78217b23885e80c0c6e424e324876799 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 21 Oct 2014 21:44:21 +0530 Subject: [PATCH] Edit Book: Ensure all entries for optional views in the view menu are in alphabetical order --- src/calibre/gui2/tweak_book/ui.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/tweak_book/ui.py b/src/calibre/gui2/tweak_book/ui.py index aaed5755f9..0f785c067a 100644 --- a/src/calibre/gui2/tweak_book/ui.py +++ b/src/calibre/gui2/tweak_book/ui.py @@ -519,7 +519,8 @@ class Main(MainWindow): e = b.addMenu(_('&View')) t = e.addMenu(_('Tool&bars')) e.addSeparator() - for name, ac in actions.iteritems(): + for name in sorted(actions, key=lambda x:sort_key(actions[x].text())): + ac = actions[name] if name.endswith('-dock'): e.addAction(ac) elif name.endswith('-bar'):