Fixed error about enumeration of files in local_data_directory; It should now also find packages from *both* directories.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@559 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-07-12 17:37:08 +00:00
parent d590819762
commit a234b24728
5 changed files with 63 additions and 62 deletions
+5 -4
View File
@@ -15,6 +15,8 @@
#include <wx/filename.h>
#include <wx/notebook.h>
DECLARE_TYPEOF_COLLECTION(PackagedP);
// ----------------------------------------------------------------------------- : Preferences pages
// A page from the preferences dialog
@@ -131,16 +133,15 @@ GlobalPreferencesPage::GlobalPreferencesPage(Window* parent)
// init controls
language = new wxComboBox(this, wxID_ANY, _(""), wxDefaultPosition, wxDefaultSize, 0, nullptr, wxCB_READONLY | wxCB_SORT);
// set values
String f = ::packages.findFirst(_("*.mse-locale"));
vector<PackagedP> locales;
::packages.findMatching(_("*.mse-locale"), locales);
int n = 0;
while (!f.empty()) {
PackagedP package = packages.openAny(f);
FOR_EACH(package, locales) {
language->Append(package->name() + _(": ") + package->full_name, package.get());
if (settings.locale == package->name()) {
language->SetSelection(n);
}
n++;
f = wxFindNextFile();
}
// init sizer
wxSizer* s = new wxBoxSizer(wxVERTICAL);