]> git.lyx.org Git - features.git/commitdiff
Backport fix for bug #7751: Sort the modules and formats by translated string.
authorRichard Heck <rgheck@comcast.net>
Mon, 5 Sep 2011 18:58:56 +0000 (18:58 +0000)
committerRichard Heck <rgheck@comcast.net>
Mon, 5 Sep 2011 18:58:56 +0000 (18:58 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_2_0_X@39596 a592a061-630c-0410-9148-cb99ea01b6c8

src/ModuleList.cpp
src/frontends/qt4/GuiSendto.cpp
status.20x

index a9658710029e440959749bd48b9f0902f63070d7..49895e6d4df32af6b452d3236fa7834268f99fff 100644 (file)
@@ -18,6 +18,7 @@
 
 #include "support/debug.h"
 #include "support/FileName.h"
+#include "support/gettext.h"
 #include "support/filetools.h"
 #include "support/lstrings.h"
 
@@ -112,18 +113,19 @@ bool LyXModule::areCompatible(string const & mod1, string const & mod2)
        return true;
 }
 
+
 // used when sorting the module list.
 class ModuleSorter
 {
 public:
        int operator()(LyXModule const & lm1, LyXModule const & lm2) const
        {
-               return lm1.getName() < lm2.getName();
+               return _(lm1.getName()) < _(lm2.getName());
        }
 };
 
 
-//Much of this is borrowed from LayoutFileList::read()
+// Much of this is borrowed from LayoutFileList::read()
 bool ModuleList::read()
 {
        FileName const real_file = libFileSearch("", "lyxmodules.lst");
index 56753429595ba99aa86600708456e470bb333efb..8bb8242a5b91aace0f9cb8e1cabde9a6afad718a 100644 (file)
@@ -19,8 +19,9 @@
 #include "Format.h"
 #include "FuncRequest.h"
 
-#include "support/qstring_helpers.h"
 #include "support/filetools.h"
+#include "support/gettext.h"
+#include "support/qstring_helpers.h"
 
 #include <algorithm>
 
@@ -67,12 +68,14 @@ void GuiSendTo::changed_adaptor()
        changed();
 }
 
+
 namespace {
 bool formatSorter(Format const * lhs, Format const * rhs) {
-       return lhs->prettyname() < rhs->prettyname();
+       return _(lhs->prettyname()) < _(rhs->prettyname());
 }
 } // end namespace
 
+
 void GuiSendTo::updateContents()
 {
        all_formats_ = buffer().params().exportableFormats(false);
index b1027edb816f60a05a880b2f748cab4fb90ac9c8..5620c6e223415abca6177e251b26770ae0574650 100644 (file)
@@ -56,6 +56,10 @@ What's new
 - Adjust the cursor language after document language change had changed the
   text language (bug 7681).
 
+- Correctly sort modules in Document>Settings and formats in the "Other 
+  formats" dialog (bug 7751).
+
+
 * ADVANCED FIND AND REPLACE