Add Locale config preferences and rearrange UI prefs
This commit is contained in:
parent
27ee53bf8f
commit
0869aa0f6c
@ -103,9 +103,15 @@ OptionEditorHeading::add_to_page (OptionEditorPage* p)
|
||||
{
|
||||
int const n = p->table.property_n_rows();
|
||||
p->table.resize (n + 2, 3);
|
||||
if (!_note.empty ()) {
|
||||
p->table.resize (n + 3, 3);
|
||||
} else {
|
||||
p->table.resize (n + 2, 3);
|
||||
}
|
||||
|
||||
p->table.attach (*manage (new Label ("")), 0, 3, n, n + 1, FILL | EXPAND);
|
||||
p->table.attach (*_label, 0, 3, n + 1, n + 2, FILL | EXPAND);
|
||||
maybe_add_note (p, n + 2);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -79,7 +79,7 @@ public:
|
||||
|
||||
virtual Gtk::Widget& tip_widget() = 0;
|
||||
|
||||
private:
|
||||
protected:
|
||||
void maybe_add_note (OptionEditorPage *, int);
|
||||
|
||||
std::string _note;
|
||||
|
@ -3116,30 +3116,6 @@ if (!ARDOUR::Profile->get_mixbus()) {
|
||||
|
||||
add_option (_("MIDI"), audition_synth);
|
||||
|
||||
/* USER INTERACTION */
|
||||
|
||||
if (
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
true
|
||||
#else
|
||||
getenv ("ARDOUR_BUNDLED")
|
||||
#endif
|
||||
)
|
||||
{
|
||||
add_option (_("User interaction"),
|
||||
new BoolOption (
|
||||
"enable-translation",
|
||||
string_compose (_("Use translations of %1 messages\n"
|
||||
" <i>(requires a restart of %1 to take effect)</i>\n"
|
||||
" <i>(if available for your language preferences)</i>"), PROGRAM_NAME),
|
||||
sigc::ptr_fun (ARDOUR::translations_are_enabled),
|
||||
sigc::ptr_fun (ARDOUR::set_translations_enabled)));
|
||||
}
|
||||
|
||||
add_option (_("User interaction"), new OptionEditorHeading (_("Keyboard")));
|
||||
|
||||
add_option (_("User interaction"), new KeyboardOptions);
|
||||
|
||||
/* Control Surfaces */
|
||||
|
||||
add_option (_("Control Surfaces"), new ControlSurfacesOptions);
|
||||
@ -3479,6 +3455,40 @@ if (!ARDOUR::Profile->get_mixbus()) {
|
||||
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_default_narrow_ms)
|
||||
));
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
OptionEditorHeading* i18n_head = new OptionEditorHeading (_("Internationalization"));
|
||||
i18n_head->set_note (string_compose (_("These settings will only take effect after %1 is restarted (if available for your language preferences)."), PROGRAM_NAME));
|
||||
|
||||
add_option (_("GUI/Translation"), i18n_head);
|
||||
|
||||
bo = new BoolOption (
|
||||
"enable-translation",
|
||||
_("Use translations"),
|
||||
sigc::ptr_fun (ARDOUR::translations_are_enabled),
|
||||
sigc::ptr_fun (ARDOUR::set_translations_enabled)
|
||||
);
|
||||
|
||||
add_option (_("GUI/Translation"), bo);
|
||||
|
||||
_l10n = new ComboOption<ARDOUR::LocaleMode> (
|
||||
"locale-mode",
|
||||
_("Localization"),
|
||||
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_locale_mode),
|
||||
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_locale_mode)
|
||||
);
|
||||
|
||||
_l10n->add (ARDOUR::SET_LC_ALL, _("Set complete locale"));
|
||||
_l10n->add (ARDOUR::SET_LC_MESSAGES, _("Enable only message translation"));
|
||||
_l10n->add (ARDOUR::SET_LC_MESSAGES_AND_LC_NUMERIC, _("Translate messages and format numeric format"));
|
||||
_l10n->set_note (_("This setting is provided for plugin compatibility. e.g. some plugins on some systems expect the decimal point to be a dot."));
|
||||
|
||||
add_option (_("GUI/Translation"), _l10n);
|
||||
parameter_changed ("enable-translation");
|
||||
#endif // ENABLE_NLS
|
||||
|
||||
add_option (_("GUI/Keyboard"), new OptionEditorHeading (_("Keyboard")));
|
||||
add_option (_("GUI/Keyboard"), new KeyboardOptions);
|
||||
|
||||
add_option (_("GUI/Toolbar"), new OptionEditorHeading (_("Main Transport Items")));
|
||||
|
||||
add_option (_("GUI/Toolbar"),
|
||||
@ -3763,6 +3773,10 @@ RCOptionEditor::parameter_changed (string const & p)
|
||||
} else if (p == "open-gui-after-adding-plugin" || p == "show-inline-display-by-default") {
|
||||
#if (defined LV2_SUPPORT && defined LV2_EXTENDED)
|
||||
_plugin_prefer_inline->set_sensitive (UIConfiguration::instance().get_open_gui_after_adding_plugin() && UIConfiguration::instance().get_show_inline_display_by_default());
|
||||
#endif
|
||||
#ifdef ENABLE_NLS
|
||||
} else if (p == "enable-translation") {
|
||||
_l10n->set_sensitive (ARDOUR::translations_are_enabled ());
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -60,6 +60,7 @@ private:
|
||||
Gtk::Adjustment* _ltc_volume_adjustment;
|
||||
BoolOption* _ltc_send_continuously;
|
||||
BoolOption* _plugin_prefer_inline;
|
||||
ComboOption<ARDOUR::LocaleMode>* _l10n;
|
||||
|
||||
PBD::ScopedConnection parameter_change_connection;
|
||||
PBD::ScopedConnection engine_started_connection;
|
||||
|
Loading…
Reference in New Issue
Block a user