mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Fix bug #7751: Sort the modules and formats by translated string.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39579 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
c3e29913f0
commit
e2f6bd6d45
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
#include "support/debug.h"
|
#include "support/debug.h"
|
||||||
#include "support/FileName.h"
|
#include "support/FileName.h"
|
||||||
|
#include "support/gettext.h"
|
||||||
#include "support/filetools.h"
|
#include "support/filetools.h"
|
||||||
#include "support/lstrings.h"
|
#include "support/lstrings.h"
|
||||||
|
|
||||||
@ -112,18 +113,19 @@ bool LyXModule::areCompatible(string const & mod1, string const & mod2)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// used when sorting the module list.
|
// used when sorting the module list.
|
||||||
class ModuleSorter
|
class ModuleSorter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int operator()(LyXModule const & lm1, LyXModule const & lm2) const
|
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()
|
bool ModuleList::read()
|
||||||
{
|
{
|
||||||
FileName const real_file = libFileSearch("", "lyxmodules.lst");
|
FileName const real_file = libFileSearch("", "lyxmodules.lst");
|
||||||
|
@ -19,8 +19,9 @@
|
|||||||
#include "Format.h"
|
#include "Format.h"
|
||||||
#include "FuncRequest.h"
|
#include "FuncRequest.h"
|
||||||
|
|
||||||
#include "support/qstring_helpers.h"
|
|
||||||
#include "support/filetools.h"
|
#include "support/filetools.h"
|
||||||
|
#include "support/gettext.h"
|
||||||
|
#include "support/qstring_helpers.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
@ -67,12 +68,14 @@ void GuiSendTo::changed_adaptor()
|
|||||||
changed();
|
changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
bool formatSorter(Format const * lhs, Format const * rhs) {
|
bool formatSorter(Format const * lhs, Format const * rhs) {
|
||||||
return lhs->prettyname() < rhs->prettyname();
|
return _(lhs->prettyname()) < _(rhs->prettyname());
|
||||||
}
|
}
|
||||||
} // end namespace
|
} // end namespace
|
||||||
|
|
||||||
|
|
||||||
void GuiSendTo::updateContents()
|
void GuiSendTo::updateContents()
|
||||||
{
|
{
|
||||||
all_formats_ = buffer().params().exportableFormats(false);
|
all_formats_ = buffer().params().exportableFormats(false);
|
||||||
|
Loading…
Reference in New Issue
Block a user