add config-var for insert_at and show_on_cue_page
* store the user's selection in the configu
This commit is contained in:
parent
b25aa18c80
commit
c8afda0116
@ -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.
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user