diff --git a/gtk2_ardour/add_route_dialog.cc b/gtk2_ardour/add_route_dialog.cc index 1430abee9f..63dab03942 100644 --- a/gtk2_ardour/add_route_dialog.cc +++ b/gtk2_ardour/add_route_dialog.cc @@ -53,6 +53,7 @@ #include "add_route_dialog.h" #include "ardour_ui.h" #include "route_group_dialog.h" +#include "ui_config.h" #include "utils.h" #include "pbd/i18n.h" @@ -177,12 +178,14 @@ AddRouteDialog::AddRouteDialog () insert_at_combo.append_text (_("Before Selection")); insert_at_combo.append_text (_("After Selection")); insert_at_combo.append_text (_("Last")); - insert_at_combo.set_active (3); + insert_at_combo.set_active (min(UIConfiguration::instance().get_insert_at_position (), (uint32_t)3)); strict_io_combo.append_text (_("Flexible-I/O")); strict_io_combo.append_text (_("Strict-I/O")); strict_io_combo.set_active (Config->get_strict_io () ? 1 : 0); + show_on_cue_chkbox.set_active (UIConfiguration::instance().get_show_on_cue_page ()); + /* top-level VBox */ VBox* vbox = manage (new VBox); get_vbox()->set_spacing (4); @@ -365,6 +368,10 @@ AddRouteDialog::~AddRouteDialog () void AddRouteDialog::on_response (int r) { + /* stash the user's visibility-settings in the config */ + UIConfiguration::instance().set_show_on_cue_page (show_on_cue_page()); + UIConfiguration::instance().set_insert_at_position ((int) insert_at()); + reset_name_edited (); /* Don't call ArdourDialog::on_response() because that will automatically hide the dialog. diff --git a/gtk2_ardour/ui_config_vars.h b/gtk2_ardour/ui_config_vars.h index c61923598a..13d244b60b 100644 --- a/gtk2_ardour/ui_config_vars.h +++ b/gtk2_ardour/ui_config_vars.h @@ -136,3 +136,7 @@ UI_CONFIG_VARIABLE (bool, show_region_name, "show-region-name", true) UI_CONFIG_VARIABLE (int, time_axis_name_ellipsize_mode, "time-axis-name-ellipsize-mode", 0) UI_CONFIG_VARIABLE (bool, show_triggers_inline, "show-triggers-inline", false) UI_CONFIG_VARIABLE (bool, one_plugin_window_only, "one-plugin-window-only", false) + +/* these are visibility-type selections in the New Track dialog that we should make persistent for the user's choices */ +UI_CONFIG_VARIABLE (bool, show_on_cue_page, "show-on-cue-page", true) +UI_CONFIG_VARIABLE (uint32_t, insert_at_position, "insert-at-position", 3)