]> git.lyx.org Git - features.git/commitdiff
Improve display of index names under Insert>Lists/TOC.
authorRichard Heck <rgheck@comcast.net>
Tue, 2 Nov 2010 20:38:42 +0000 (20:38 +0000)
committerRichard Heck <rgheck@comcast.net>
Tue, 2 Nov 2010 20:38:42 +0000 (20:38 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36006 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/Menus.cpp

index bdf75caadecc8840a35f3247edfdfe0450aec25d..4137f33f4616d1aa803d4f8389965d40a5399f63 100644 (file)
@@ -1358,16 +1358,16 @@ void MenuDefinition::expandIndices(Buffer const * buf, bool listof)
        IndicesList::const_iterator end = params.indiceslist().end();
 
        for (int ii = 1; cit != end; ++cit, ++ii) {
-               if (listof)
-                       addWithStatusCheck(MenuItem(MenuItem::Command, toqstr(cit->index()),
-                                          FuncRequest(LFUN_INDEX_PRINT,
-                                                 cit->shortcut())));
-               else {
-                       docstring label = _("Index Entry");
-                       label += " (" + cit->index() + ")";
+               if (listof) {
+                       docstring const label = 
+                               bformat(_("Index: %1$s"), cit->index());
                        addWithStatusCheck(MenuItem(MenuItem::Command, toqstr(label),
-                                          FuncRequest(LFUN_INDEX_INSERT,
-                                                 cit->shortcut())));
+                                          FuncRequest(LFUN_INDEX_PRINT, cit->shortcut())));
+               } else {
+                       docstring const label = 
+                               bformat(_("Index Entry (%1$s)"), cit->index());
+                       addWithStatusCheck(MenuItem(MenuItem::Command, toqstr(label),
+                                          FuncRequest(LFUN_INDEX_INSERT, cit->shortcut())));
                }
        }
 }