Commit 8cb9ce3f authored by twanvl's avatar twanvl

Setting for opening sets in the same window (pre 0.3.6 behaviour)

parent 703bc9ea
......@@ -444,6 +444,7 @@ label:
# Preferences
language: Language
windows: Open sets
app language: Language of the user interface:
card display: Card Display
zoom: &Zoom:
......@@ -548,6 +549,7 @@ button:
last opened set: Last opened set
# Preferences
open sets in new window: Open all sets in a new &window
select: &Select...
browse: &Browse...
high quality: &High quality rendering
......
......@@ -39,6 +39,7 @@ class GlobalPreferencesPage : public PreferencesPage {
private:
wxComboBox* language;
wxCheckBox* open_sets_in_new_window;
};
// Preferences page for card viewing related settings
......@@ -137,6 +138,7 @@ GlobalPreferencesPage::GlobalPreferencesPage(Window* parent)
{
// init controls
language = new wxComboBox(this, wxID_ANY, _(""), wxDefaultPosition, wxDefaultSize, 0, nullptr, wxCB_READONLY);
open_sets_in_new_window = new wxCheckBox(this, wxID_ANY, _BUTTON_("open sets in new window"));
// set values
vector<PackagedP> locales;
package_manager.findMatching(_("*.mse-locale"), locales);
......@@ -149,23 +151,30 @@ GlobalPreferencesPage::GlobalPreferencesPage(Window* parent)
}
n++;
}
open_sets_in_new_window->SetValue(settings.open_sets_in_new_window);
// init sizer
wxSizer* s = new wxBoxSizer(wxVERTICAL);
s->SetSizeHints(this);
wxSizer* s2 = new wxStaticBoxSizer(wxVERTICAL, this, _LABEL_("language"));
s2->Add(new wxStaticText(this, wxID_ANY, _LABEL_("app language")), 0, wxALL, 4);
s2->Add(language, 0, wxEXPAND | wxALL & ~wxTOP, 4);
s2->Add(new wxStaticText(this, wxID_ANY, _HELP_( "app language")), 0, wxALL & ~wxTOP, 4);
s2->Add(new wxStaticText(this, wxID_ANY, _HELP_( "app language")), 0, wxALL, 4);
s->Add(s2, 0, wxALL | wxEXPAND, 8);
wxSizer* s3 = new wxStaticBoxSizer(wxVERTICAL, this, _LABEL_("windows"));
s3->Add(open_sets_in_new_window, 0, wxALL, 4);
s->Add(s3, 0, wxALL & ~wxTOP | wxEXPAND, 8);
SetSizer(s);
}
void GlobalPreferencesPage::store() {
// locale
int n = language->GetSelection();
if (n == wxNOT_FOUND) return;
Packaged* p = (Packaged*)language->GetClientData(n);
settings.locale = p->name();
// set the_locale?
// open_sets_in_new_window
settings.open_sets_in_new_window = open_sets_in_new_window->GetValue();
}
// ----------------------------------------------------------------------------- : Preferences page : display
......
# This file contains the keys expected to be in MSE locales
# It was automatically generated by tools/locale/locale.pl
# Generated on Sat Aug 9 19:00:54 2008
# Generated on Wed Aug 27 13:54:25 2008
action:
add control point: 0
......@@ -70,6 +70,7 @@ button:
number: 0
number overwrite: 0
open set: 0
open sets in new window: 0
overwrite: 0
random seed: 0
refer parameter: 0
......@@ -334,6 +335,7 @@ label:
total cards: 0
upgrade package: 0
uses: 0
windows: 0
zoom: 0
zoom %: 0
zoom amount: 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment