fixed sorting of locale combo box

made update_checker compile in vc

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@771 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-12-12 16:21:35 +00:00
parent a20746422e
commit 306b996ee0
2 changed files with 8 additions and 1 deletions
+6 -1
View File
@@ -127,14 +127,19 @@ END_EVENT_TABLE ()
// ----------------------------------------------------------------------------- : Preferences page : global
bool compare_package_name(const PackagedP& a, const PackagedP& b) {
return a->name() < b->name();
}
GlobalPreferencesPage::GlobalPreferencesPage(Window* parent)
: PreferencesPage(parent)
{
// init controls
language = new wxComboBox(this, wxID_ANY, _(""), wxDefaultPosition, wxDefaultSize, 0, nullptr, wxCB_READONLY | wxCB_SORT);
language = new wxComboBox(this, wxID_ANY, _(""), wxDefaultPosition, wxDefaultSize, 0, nullptr, wxCB_READONLY);
// set values
vector<PackagedP> locales;
::packages.findMatching(_("*.mse-locale"), locales);
sort(locales.begin(), locales.end(), compare_package_name);
int n = 0;
FOR_EACH(package, locales) {
language->Append(package->name() + _(": ") + package->full_name, package.get());
+2
View File
@@ -30,6 +30,8 @@ DECLARE_POINTER_TYPE(VersionData);
DECLARE_TYPEOF_COLLECTION(PackageVersionDataP);
DECLARE_TYPEOF_COLLECTION(PackageDependencyP);
DECLARE_TYPEOF(list<PackageVersionDataP>);
DECLARE_TYPEOF(set<String>);
// ----------------------------------------------------------------------------- : Update data