summaryrefslogtreecommitdiff
path: root/gtk2_ardour/new_session_dialog.cc
diff options
context:
space:
mode:
authorNick Mainsbridge <beatroute@iprimus.com.au>2006-05-12 12:41:43 +0000
committerNick Mainsbridge <beatroute@iprimus.com.au>2006-05-12 12:41:43 +0000
commit2c087c28115e7b1dfbf2c58b1a22f9b9de4a2d18 (patch)
tree564ab9c9dee16bcf3fd7a567a24587896fe62d62 /gtk2_ardour/new_session_dialog.cc
parenta0fd9fa7a0940f08bde646ac338d5900c0bebde1 (diff)
NSD cleanups (again).
git-svn-id: svn://localhost/trunk/ardour2@500 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/new_session_dialog.cc')
-rw-r--r--gtk2_ardour/new_session_dialog.cc705
1 files changed, 356 insertions, 349 deletions
diff --git a/gtk2_ardour/new_session_dialog.cc b/gtk2_ardour/new_session_dialog.cc
index 78a07fd549..06ec53e356 100644
--- a/gtk2_ardour/new_session_dialog.cc
+++ b/gtk2_ardour/new_session_dialog.cc
@@ -38,288 +38,288 @@
NewSessionDialog::NewSessionDialog()
: ArdourDialog ("New Session Dialog")
{
- session_name_label = Gtk::manage(new class Gtk::Label(_("Session Name")));
- m_name = Gtk::manage(new class Gtk::Entry());
- session_location_label = Gtk::manage(new class Gtk::Label(_("Session Location")));
- m_folder = Gtk::manage(new class Gtk::FileChooserButton(Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER));
- session_template_label = Gtk::manage(new class Gtk::Label(_("Session Template")));
- m_template = Gtk::manage(new class Gtk::FileChooserButton());
- chan_count_label = Gtk::manage(new class Gtk::Label(_("Channel Count")));
- m_create_control_bus = Gtk::manage(new class Gtk::CheckButton(_("Create Control Bus")));
-
- Gtk::Adjustment *m_control_bus_channel_count_adj = Gtk::manage(new class Gtk::Adjustment(2, 0, 100, 1, 10, 10));
- m_control_bus_channel_count = Gtk::manage(new class Gtk::SpinButton(*m_control_bus_channel_count_adj, 1, 0));
-
- Gtk::Adjustment *m_master_bus_channel_count_adj = Gtk::manage(new class Gtk::Adjustment(2, 0, 100, 1, 10, 10));
- m_master_bus_channel_count = Gtk::manage(new class Gtk::SpinButton(*m_master_bus_channel_count_adj, 1, 0));
- m_create_master_bus = Gtk::manage(new class Gtk::CheckButton(_("Create Master Bus")));
- advanced_table = Gtk::manage(new class Gtk::Table(2, 2, true));
- options_label = Gtk::manage(new class Gtk::Label(_("Track/Bus connection options")));
- m_connect_inputs = Gtk::manage(new class Gtk::CheckButton(_("Automatically connect inputs")));
- m_limit_input_ports = Gtk::manage(new class Gtk::CheckButton(_("Port limit")));
-
- Gtk::Adjustment *m_input_limit_count_adj = Gtk::manage(new class Gtk::Adjustment(1, 0, 100, 1, 10, 10));
- m_input_limit_count = Gtk::manage(new class Gtk::SpinButton(*m_input_limit_count_adj, 1, 0));
- input_port_limit_hbox = Gtk::manage(new class Gtk::HBox(false, 0));
- input_port_hbox = Gtk::manage(new class Gtk::HBox(false, 0));
- input_table = Gtk::manage(new class Gtk::Table(2, 2, false));
- input_port_alignment = Gtk::manage(new class Gtk::Alignment(0.5, 0.5, 1, 1));
- input_label = Gtk::manage(new class Gtk::Label(_("<b>Input</b>")));
- input_frame = Gtk::manage(new class Gtk::Frame());
- m_connect_outputs = Gtk::manage(new class Gtk::CheckButton(_("Automatically connect outputs")));
- m_limit_output_ports = Gtk::manage(new class Gtk::CheckButton(_("Port limit")));
-
- Gtk::Adjustment *m_output_limit_count_adj = Gtk::manage(new class Gtk::Adjustment(1, 0, 100, 1, 10, 10));
- m_output_limit_count = Gtk::manage(new class Gtk::SpinButton(*m_output_limit_count_adj, 1, 0));
- output_port_limit_hbox = Gtk::manage(new class Gtk::HBox(false, 0));
- output_port_hbox = Gtk::manage(new class Gtk::HBox(false, 0));
-
- Gtk::RadioButton::Group _RadioBGroup_m_connect_outputs_to_master;
- m_connect_outputs_to_master = Gtk::manage(new class Gtk::RadioButton(_RadioBGroup_m_connect_outputs_to_master, _("Connect to Master Bus")));
- m_connect_outputs_to_physical = Gtk::manage(new class Gtk::RadioButton(_RadioBGroup_m_connect_outputs_to_master, _("Connect to physical outputs")));
- output_conn_vbox = Gtk::manage(new class Gtk::VBox(false, 0));
- output_vbox = Gtk::manage(new class Gtk::VBox(false, 0));
- output_port_alignment = Gtk::manage(new class Gtk::Alignment(0.5, 0.5, 1, 1));
- output_label = Gtk::manage(new class Gtk::Label(_("<b>Output</b>")));
- output_frame = Gtk::manage(new class Gtk::Frame());
- advanced_vbox = Gtk::manage(new class Gtk::VBox(false, 0));
- advanced_label = Gtk::manage(new class Gtk::Label(_("<b>Advanced</b>")));
- advanced_expander = Gtk::manage(new class Gtk::Expander());
- new_session_table = Gtk::manage(new class Gtk::Table(2, 2, false));
- m_open_filechooser = Gtk::manage(new class Gtk::FileChooserButton());
- open_session_hbox = Gtk::manage(new class Gtk::HBox(false, 0));
- open_session_alignment = Gtk::manage(new class Gtk::Alignment(0.5, 0.5, 1, 1));
- open_sesion_label = Gtk::manage(new class Gtk::Label(_("Open Session")));
- open_session_frame = Gtk::manage(new class Gtk::Frame());
- m_treeview = Gtk::manage(new class Gtk::TreeView());
- recent_scrolledwindow = Gtk::manage(new class Gtk::ScrolledWindow());
- recent_alignment = Gtk::manage(new class Gtk::Alignment(0.5, 0.5, 1, 1));
- recent_sesion_label = Gtk::manage(new class Gtk::Label(_("Open Recent Session")));
- recent_frame = Gtk::manage(new class Gtk::Frame());
- open_session_vbox = Gtk::manage(new class Gtk::VBox(false, 0));
- m_notebook = Gtk::manage(new class Gtk::Notebook());
- session_name_label->set_alignment(0.5,0.5);
- session_name_label->set_padding(0,0);
- session_name_label->set_justify(Gtk::JUSTIFY_LEFT);
- session_name_label->set_line_wrap(false);
- session_name_label->set_use_markup(false);
- session_name_label->set_selectable(false);
- m_name->set_visibility(true);
- m_name->set_editable(true);
- m_name->set_max_length(0);
- m_name->set_text("");
- m_name->set_has_frame(true);
- m_name->set_activates_default(false);
- session_location_label->set_alignment(0.5,0.5);
- session_location_label->set_padding(0,0);
- session_location_label->set_justify(Gtk::JUSTIFY_LEFT);
- session_location_label->set_line_wrap(false);
- session_location_label->set_use_markup(false);
- session_location_label->set_selectable(false);
- session_template_label->set_alignment(0.5,0.5);
- session_template_label->set_padding(0,0);
- session_template_label->set_justify(Gtk::JUSTIFY_LEFT);
- session_template_label->set_line_wrap(false);
- session_template_label->set_use_markup(false);
- session_template_label->set_selectable(false);
- m_create_control_bus->set_flags(Gtk::CAN_FOCUS);
- m_create_control_bus->set_relief(Gtk::RELIEF_NORMAL);
- m_create_control_bus->set_mode(true);
- m_create_control_bus->set_active(false);
- m_control_bus_channel_count->set_flags(Gtk::CAN_FOCUS);
- m_control_bus_channel_count->set_update_policy(Gtk::UPDATE_ALWAYS);
- m_control_bus_channel_count->set_numeric(true);
- m_control_bus_channel_count->set_digits(0);
- m_control_bus_channel_count->set_wrap(false);
- m_master_bus_channel_count->set_flags(Gtk::CAN_FOCUS);
- m_master_bus_channel_count->set_update_policy(Gtk::UPDATE_ALWAYS);
- m_master_bus_channel_count->set_numeric(true);
- m_master_bus_channel_count->set_digits(0);
- m_master_bus_channel_count->set_wrap(false);
- m_create_master_bus->set_flags(Gtk::CAN_FOCUS);
- m_create_master_bus->set_relief(Gtk::RELIEF_NORMAL);
- m_create_master_bus->set_mode(true);
- m_create_master_bus->set_active(true);
- advanced_table->set_row_spacings(0);
- advanced_table->set_col_spacings(0);
- advanced_table->attach(*chan_count_label, 1, 2, 0, 1, Gtk::AttachOptions(), Gtk::AttachOptions(), 0, 0);
- advanced_table->attach(*m_create_control_bus, 0, 1, 2, 3, Gtk::FILL, Gtk::AttachOptions(), 0, 0);
- advanced_table->attach(*m_control_bus_channel_count, 1, 2, 2, 3, Gtk::AttachOptions(), Gtk::AttachOptions(), 0, 0);
- advanced_table->attach(*m_master_bus_channel_count, 1, 2, 1, 2, Gtk::AttachOptions(), Gtk::AttachOptions(), 0, 0);
- advanced_table->attach(*m_create_master_bus, 0, 1, 1, 2, Gtk::FILL, Gtk::AttachOptions(), 0, 0);
- options_label->set_alignment(0.5,0.5);
- options_label->set_padding(0,0);
- options_label->set_justify(Gtk::JUSTIFY_LEFT);
- options_label->set_line_wrap(false);
- options_label->set_use_markup(false);
- options_label->set_selectable(false);
- m_connect_inputs->set_flags(Gtk::CAN_FOCUS);
- m_connect_inputs->set_relief(Gtk::RELIEF_NORMAL);
- m_connect_inputs->set_mode(true);
- m_connect_inputs->set_active(false);
- m_limit_input_ports->set_flags(Gtk::CAN_FOCUS);
- m_limit_input_ports->set_relief(Gtk::RELIEF_NORMAL);
- m_limit_input_ports->set_mode(true);
- m_limit_input_ports->set_active(false);
- m_input_limit_count->set_flags(Gtk::CAN_FOCUS);
- m_input_limit_count->set_update_policy(Gtk::UPDATE_ALWAYS);
- m_input_limit_count->set_numeric(true);
- m_input_limit_count->set_digits(0);
- m_input_limit_count->set_wrap(false);
- input_port_limit_hbox->pack_start(*m_limit_input_ports, Gtk::PACK_SHRINK, 0);
- input_port_limit_hbox->pack_start(*m_input_limit_count);
- input_port_hbox->pack_start(*m_connect_inputs, Gtk::PACK_SHRINK, 0);
- input_port_hbox->pack_start(*input_port_limit_hbox, Gtk::PACK_EXPAND_PADDING, 0);
- input_table->set_row_spacings(0);
- input_table->set_col_spacings(0);
- input_table->attach(*input_port_hbox, 0, 1, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
- input_port_alignment->add(*input_table);
- input_label->set_alignment(0.5,0.5);
- input_label->set_padding(0,0);
- input_label->set_justify(Gtk::JUSTIFY_LEFT);
- input_label->set_line_wrap(false);
- input_label->set_use_markup(true);
- input_label->set_selectable(false);
- input_frame->set_shadow_type(Gtk::SHADOW_NONE);
- input_frame->set_label_align(0,0.5);
- input_frame->add(*input_port_alignment);
- input_frame->set_label_widget(*input_label);
- m_connect_outputs->set_flags(Gtk::CAN_FOCUS);
- m_connect_outputs->set_relief(Gtk::RELIEF_NORMAL);
- m_connect_outputs->set_mode(true);
- m_connect_outputs->set_active(false);
- m_limit_output_ports->set_flags(Gtk::CAN_FOCUS);
- m_limit_output_ports->set_relief(Gtk::RELIEF_NORMAL);
- m_limit_output_ports->set_mode(true);
- m_limit_output_ports->set_active(false);
- m_output_limit_count->set_flags(Gtk::CAN_FOCUS);
- m_output_limit_count->set_update_policy(Gtk::UPDATE_ALWAYS);
- m_output_limit_count->set_numeric(false);
- m_output_limit_count->set_digits(0);
- m_output_limit_count->set_wrap(false);
- output_port_limit_hbox->pack_start(*m_limit_output_ports, Gtk::PACK_SHRINK, 0);
- output_port_limit_hbox->pack_start(*m_output_limit_count);
- output_port_hbox->pack_start(*m_connect_outputs, Gtk::PACK_SHRINK, 0);
- output_port_hbox->pack_start(*output_port_limit_hbox, Gtk::PACK_EXPAND_PADDING, 0);
- m_connect_outputs_to_master->set_flags(Gtk::CAN_FOCUS);
- m_connect_outputs_to_master->set_relief(Gtk::RELIEF_NORMAL);
- m_connect_outputs_to_master->set_mode(true);
- m_connect_outputs_to_master->set_active(false);
- m_connect_outputs_to_physical->set_flags(Gtk::CAN_FOCUS);
- m_connect_outputs_to_physical->set_relief(Gtk::RELIEF_NORMAL);
- m_connect_outputs_to_physical->set_mode(true);
- m_connect_outputs_to_physical->set_active(false);
- output_conn_vbox->pack_start(*m_connect_outputs_to_master, Gtk::PACK_SHRINK, 0);
- output_conn_vbox->pack_start(*m_connect_outputs_to_physical, Gtk::PACK_SHRINK, 0);
- output_vbox->pack_start(*output_port_hbox);
- output_vbox->pack_start(*output_conn_vbox);
- output_port_alignment->add(*output_vbox);
- output_label->set_alignment(0.5,0.5);
- output_label->set_padding(0,0);
- output_label->set_justify(Gtk::JUSTIFY_LEFT);
- output_label->set_line_wrap(false);
- output_label->set_use_markup(true);
- output_label->set_selectable(false);
- output_frame->set_shadow_type(Gtk::SHADOW_NONE);
- output_frame->set_label_align(0,0.5);
- output_frame->add(*output_port_alignment);
- output_frame->set_label_widget(*output_label);
- advanced_vbox->pack_start(*advanced_table, Gtk::PACK_SHRINK, 0);
- advanced_vbox->pack_start(*options_label, Gtk::PACK_SHRINK, 14);
- advanced_vbox->pack_start(*input_frame);
- advanced_vbox->pack_start(*output_frame);
- advanced_label->set_alignment(0.5,0.5);
- advanced_label->set_padding(0,0);
- advanced_label->set_justify(Gtk::JUSTIFY_LEFT);
- advanced_label->set_line_wrap(false);
- advanced_label->set_use_markup(true);
- advanced_label->set_selectable(false);
- advanced_expander->set_flags(Gtk::CAN_FOCUS);
- advanced_expander->set_border_width(10);
- advanced_expander->set_expanded(true);
- advanced_expander->set_spacing(0);
- advanced_expander->add(*advanced_vbox);
- advanced_expander->set_label_widget(*advanced_label);
- new_session_table->set_border_width(5);
- new_session_table->set_row_spacings(1);
- new_session_table->set_col_spacings(1);
- new_session_table->attach(*session_name_label, 0, 1, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
- new_session_table->attach(*m_name, 1, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
- new_session_table->attach(*session_location_label, 0, 1, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
- new_session_table->attach(*m_folder, 1, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
- new_session_table->attach(*session_template_label, 0, 1, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
- new_session_table->attach(*m_template, 1, 2, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
- new_session_table->attach(*advanced_expander, 0, 2, 3, 4, Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
- chan_count_label->set_alignment(0.5,0.5);
- chan_count_label->set_padding(0,0);
- chan_count_label->set_justify(Gtk::JUSTIFY_LEFT);
- chan_count_label->set_line_wrap(false);
- chan_count_label->set_use_markup(false);
- chan_count_label->set_selectable(false);
- open_session_hbox->pack_start(*m_open_filechooser);
- open_session_alignment->add(*open_session_hbox);
- open_sesion_label->set_alignment(0.5,0.5);
- open_sesion_label->set_padding(0,0);
- open_sesion_label->set_justify(Gtk::JUSTIFY_LEFT);
- open_sesion_label->set_line_wrap(false);
- open_sesion_label->set_use_markup(false);
- open_sesion_label->set_selectable(false);
- open_session_frame->set_border_width(10);
- open_session_frame->set_shadow_type(Gtk::SHADOW_IN);
- open_session_frame->set_label_align(0,0.5);
- open_session_frame->add(*open_session_alignment);
- open_session_frame->set_label_widget(*open_sesion_label);
- m_treeview->set_flags(Gtk::CAN_FOCUS);
- m_treeview->set_headers_visible(true);
- m_treeview->set_rules_hint(false);
- m_treeview->set_reorderable(false);
- m_treeview->set_enable_search(true);
- m_treeview->set_fixed_height_mode(false);
- m_treeview->set_hover_selection(false);
- m_treeview->set_hover_expand(true);
- recent_scrolledwindow->set_flags(Gtk::CAN_FOCUS);
- recent_scrolledwindow->set_border_width(10);
- recent_scrolledwindow->set_shadow_type(Gtk::SHADOW_IN);
- recent_scrolledwindow->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
- recent_scrolledwindow->property_window_placement().set_value(Gtk::CORNER_TOP_LEFT);
- recent_scrolledwindow->add(*m_treeview);
- recent_alignment->add(*recent_scrolledwindow);
- recent_sesion_label->set_alignment(0.5,0.5);
- recent_sesion_label->set_padding(0,0);
- recent_sesion_label->set_justify(Gtk::JUSTIFY_LEFT);
- recent_sesion_label->set_line_wrap(false);
- recent_sesion_label->set_use_markup(false);
- recent_sesion_label->set_selectable(false);
- recent_frame->set_border_width(10);
- recent_frame->set_shadow_type(Gtk::SHADOW_IN);
- recent_frame->set_label_align(0,0.5);
- recent_frame->add(*recent_alignment);
- recent_frame->set_label_widget(*recent_sesion_label);
- open_session_vbox->pack_start(*open_session_frame, Gtk::PACK_SHRINK, 0);
- open_session_vbox->pack_start(*recent_frame, Gtk::PACK_EXPAND_WIDGET, 5);
- m_notebook->set_flags(Gtk::CAN_FOCUS);
- m_notebook->set_show_tabs(true);
- m_notebook->set_show_border(true);
- m_notebook->set_tab_pos(Gtk::POS_TOP);
- m_notebook->set_scrollable(false);
- m_notebook->append_page(*new_session_table, _("New Session"));
- m_notebook->pages().back().set_tab_label_packing(false, true, Gtk::PACK_START);
- m_notebook->append_page(*open_session_vbox, _("Open Session"));
- m_notebook->pages().back().set_tab_label_packing(false, true, Gtk::PACK_START);
- get_vbox()->set_homogeneous(false);
- get_vbox()->set_spacing(0);
- get_vbox()->pack_start(*m_notebook, Gtk::PACK_SHRINK, 0);
- set_title(_("Create New Session"));
- //set_modal(false);
- //property_window_position().set_value(Gtk::WIN_POS_NONE);
- set_resizable(true);
- //property_destroy_with_parent().set_value(false);
- set_has_separator(true);
- add_button(Gtk::Stock::HELP, Gtk::RESPONSE_HELP);
- add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
- add_button(Gtk::Stock::CLEAR, Gtk::RESPONSE_NONE);
- add_button(Gtk::Stock::OK, Gtk::RESPONSE_OK);
- show_all_children();
+ session_name_label = Gtk::manage(new class Gtk::Label(_("Session Name")));
+ m_name = Gtk::manage(new class Gtk::Entry());
+ session_location_label = Gtk::manage(new class Gtk::Label(_("Session Location")));
+ m_folder = Gtk::manage(new class Gtk::FileChooserButton(Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER));
+ session_template_label = Gtk::manage(new class Gtk::Label(_("Session Template")));
+ m_template = Gtk::manage(new class Gtk::FileChooserButton());
+ chan_count_label = Gtk::manage(new class Gtk::Label(_("Channel Count")));
+ m_create_control_bus = Gtk::manage(new class Gtk::CheckButton(_("Create Control Bus")));
+
+ Gtk::Adjustment *m_control_bus_channel_count_adj = Gtk::manage(new class Gtk::Adjustment(2, 0, 100, 1, 10, 10));
+ m_control_bus_channel_count = Gtk::manage(new class Gtk::SpinButton(*m_control_bus_channel_count_adj, 1, 0));
+
+ Gtk::Adjustment *m_master_bus_channel_count_adj = Gtk::manage(new class Gtk::Adjustment(2, 0, 100, 1, 10, 10));
+ m_master_bus_channel_count = Gtk::manage(new class Gtk::SpinButton(*m_master_bus_channel_count_adj, 1, 0));
+ m_create_master_bus = Gtk::manage(new class Gtk::CheckButton(_("Create Master Bus")));
+ advanced_table = Gtk::manage(new class Gtk::Table(2, 2, true));
+ options_label = Gtk::manage(new class Gtk::Label(_("Track/Bus connection options")));
+ m_connect_inputs = Gtk::manage(new class Gtk::CheckButton(_("Automatically connect inputs")));
+ m_limit_input_ports = Gtk::manage(new class Gtk::CheckButton(_("Port limit")));
+
+ Gtk::Adjustment *m_input_limit_count_adj = Gtk::manage(new class Gtk::Adjustment(1, 0, 100, 1, 10, 10));
+ m_input_limit_count = Gtk::manage(new class Gtk::SpinButton(*m_input_limit_count_adj, 1, 0));
+ input_port_limit_hbox = Gtk::manage(new class Gtk::HBox(false, 0));
+ input_port_hbox = Gtk::manage(new class Gtk::HBox(false, 0));
+ input_table = Gtk::manage(new class Gtk::Table(2, 2, false));
+ input_port_alignment = Gtk::manage(new class Gtk::Alignment(0.5, 0.5, 1, 1));
+ input_label = Gtk::manage(new class Gtk::Label(_("<b>Input</b>")));
+ input_frame = Gtk::manage(new class Gtk::Frame());
+ m_connect_outputs = Gtk::manage(new class Gtk::CheckButton(_("Automatically connect outputs")));
+ m_limit_output_ports = Gtk::manage(new class Gtk::CheckButton(_("Port limit")));
+
+ Gtk::Adjustment *m_output_limit_count_adj = Gtk::manage(new class Gtk::Adjustment(1, 0, 100, 1, 10, 10));
+ m_output_limit_count = Gtk::manage(new class Gtk::SpinButton(*m_output_limit_count_adj, 1, 0));
+ output_port_limit_hbox = Gtk::manage(new class Gtk::HBox(false, 0));
+ output_port_hbox = Gtk::manage(new class Gtk::HBox(false, 0));
+
+ Gtk::RadioButton::Group _RadioBGroup_m_connect_outputs_to_master;
+ m_connect_outputs_to_master = Gtk::manage(new class Gtk::RadioButton(_RadioBGroup_m_connect_outputs_to_master, _("Connect to Master Bus")));
+ m_connect_outputs_to_physical = Gtk::manage(new class Gtk::RadioButton(_RadioBGroup_m_connect_outputs_to_master, _("Connect to physical outputs")));
+ output_conn_vbox = Gtk::manage(new class Gtk::VBox(false, 0));
+ output_vbox = Gtk::manage(new class Gtk::VBox(false, 0));
+ output_port_alignment = Gtk::manage(new class Gtk::Alignment(0.5, 0.5, 1, 1));
+ output_label = Gtk::manage(new class Gtk::Label(_("<b>Output</b>")));
+ output_frame = Gtk::manage(new class Gtk::Frame());
+ advanced_vbox = Gtk::manage(new class Gtk::VBox(false, 0));
+ advanced_label = Gtk::manage(new class Gtk::Label(_("<b>Advanced</b>")));
+ advanced_expander = Gtk::manage(new class Gtk::Expander());
+ new_session_table = Gtk::manage(new class Gtk::Table(2, 2, false));
+ m_open_filechooser = Gtk::manage(new class Gtk::FileChooserButton());
+ open_session_hbox = Gtk::manage(new class Gtk::HBox(false, 0));
+ open_session_alignment = Gtk::manage(new class Gtk::Alignment(0.5, 0.5, 1, 1));
+ open_sesion_label = Gtk::manage(new class Gtk::Label(_("Open Session")));
+ open_session_frame = Gtk::manage(new class Gtk::Frame());
+ m_treeview = Gtk::manage(new class Gtk::TreeView());
+ recent_scrolledwindow = Gtk::manage(new class Gtk::ScrolledWindow());
+ recent_alignment = Gtk::manage(new class Gtk::Alignment(0.5, 0.5, 1, 1));
+ recent_sesion_label = Gtk::manage(new class Gtk::Label(_("Open Recent Session")));
+ recent_frame = Gtk::manage(new class Gtk::Frame());
+ open_session_vbox = Gtk::manage(new class Gtk::VBox(false, 0));
+ m_notebook = Gtk::manage(new class Gtk::Notebook());
+ session_name_label->set_alignment(0.5,0.5);
+ session_name_label->set_padding(0,0);
+ session_name_label->set_justify(Gtk::JUSTIFY_LEFT);
+ session_name_label->set_line_wrap(false);
+ session_name_label->set_use_markup(false);
+ session_name_label->set_selectable(false);
+ m_name->set_visibility(true);
+ m_name->set_editable(true);
+ m_name->set_max_length(0);
+ m_name->set_text("");
+ m_name->set_has_frame(true);
+ m_name->set_activates_default(false);
+ session_location_label->set_alignment(0.5,0.5);
+ session_location_label->set_padding(0,0);
+ session_location_label->set_justify(Gtk::JUSTIFY_LEFT);
+ session_location_label->set_line_wrap(false);
+ session_location_label->set_use_markup(false);
+ session_location_label->set_selectable(false);
+ session_template_label->set_alignment(0.5,0.5);
+ session_template_label->set_padding(0,0);
+ session_template_label->set_justify(Gtk::JUSTIFY_LEFT);
+ session_template_label->set_line_wrap(false);
+ session_template_label->set_use_markup(false);
+ session_template_label->set_selectable(false);
+ m_create_control_bus->set_flags(Gtk::CAN_FOCUS);
+ m_create_control_bus->set_relief(Gtk::RELIEF_NORMAL);
+ m_create_control_bus->set_mode(true);
+ m_create_control_bus->set_active(false);
+ m_control_bus_channel_count->set_flags(Gtk::CAN_FOCUS);
+ m_control_bus_channel_count->set_update_policy(Gtk::UPDATE_ALWAYS);
+ m_control_bus_channel_count->set_numeric(true);
+ m_control_bus_channel_count->set_digits(0);
+ m_control_bus_channel_count->set_wrap(false);
+ m_master_bus_channel_count->set_flags(Gtk::CAN_FOCUS);
+ m_master_bus_channel_count->set_update_policy(Gtk::UPDATE_ALWAYS);
+ m_master_bus_channel_count->set_numeric(true);
+ m_master_bus_channel_count->set_digits(0);
+ m_master_bus_channel_count->set_wrap(false);
+ m_create_master_bus->set_flags(Gtk::CAN_FOCUS);
+ m_create_master_bus->set_relief(Gtk::RELIEF_NORMAL);
+ m_create_master_bus->set_mode(true);
+ m_create_master_bus->set_active(true);
+ advanced_table->set_row_spacings(0);
+ advanced_table->set_col_spacings(0);
+ advanced_table->attach(*chan_count_label, 1, 2, 0, 1, Gtk::AttachOptions(), Gtk::AttachOptions(), 0, 0);
+ advanced_table->attach(*m_create_control_bus, 0, 1, 2, 3, Gtk::FILL, Gtk::AttachOptions(), 0, 0);
+ advanced_table->attach(*m_control_bus_channel_count, 1, 2, 2, 3, Gtk::AttachOptions(), Gtk::AttachOptions(), 0, 0);
+ advanced_table->attach(*m_master_bus_channel_count, 1, 2, 1, 2, Gtk::AttachOptions(), Gtk::AttachOptions(), 0, 0);
+ advanced_table->attach(*m_create_master_bus, 0, 1, 1, 2, Gtk::FILL, Gtk::AttachOptions(), 0, 0);
+ options_label->set_alignment(0.5,0.5);
+ options_label->set_padding(0,0);
+ options_label->set_justify(Gtk::JUSTIFY_LEFT);
+ options_label->set_line_wrap(false);
+ options_label->set_use_markup(false);
+ options_label->set_selectable(false);
+ m_connect_inputs->set_flags(Gtk::CAN_FOCUS);
+ m_connect_inputs->set_relief(Gtk::RELIEF_NORMAL);
+ m_connect_inputs->set_mode(true);
+ m_connect_inputs->set_active(false);
+ m_limit_input_ports->set_flags(Gtk::CAN_FOCUS);
+ m_limit_input_ports->set_relief(Gtk::RELIEF_NORMAL);
+ m_limit_input_ports->set_mode(true);
+ m_limit_input_ports->set_active(false);
+ m_input_limit_count->set_flags(Gtk::CAN_FOCUS);
+ m_input_limit_count->set_update_policy(Gtk::UPDATE_ALWAYS);
+ m_input_limit_count->set_numeric(true);
+ m_input_limit_count->set_digits(0);
+ m_input_limit_count->set_wrap(false);
+ input_port_limit_hbox->pack_start(*m_limit_input_ports, Gtk::PACK_SHRINK, 0);
+ input_port_limit_hbox->pack_start(*m_input_limit_count);
+ input_port_hbox->pack_start(*m_connect_inputs, Gtk::PACK_SHRINK, 0);
+ input_port_hbox->pack_start(*input_port_limit_hbox, Gtk::PACK_EXPAND_PADDING, 0);
+ input_table->set_row_spacings(0);
+ input_table->set_col_spacings(0);
+ input_table->attach(*input_port_hbox, 0, 1, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+ input_port_alignment->add(*input_table);
+ input_label->set_alignment(0.5,0.5);
+ input_label->set_padding(0,0);
+ input_label->set_justify(Gtk::JUSTIFY_LEFT);
+ input_label->set_line_wrap(false);
+ input_label->set_use_markup(true);
+ input_label->set_selectable(false);
+ input_frame->set_shadow_type(Gtk::SHADOW_NONE);
+ input_frame->set_label_align(0,0.5);
+ input_frame->add(*input_port_alignment);
+ input_frame->set_label_widget(*input_label);
+ m_connect_outputs->set_flags(Gtk::CAN_FOCUS);
+ m_connect_outputs->set_relief(Gtk::RELIEF_NORMAL);
+ m_connect_outputs->set_mode(true);
+ m_connect_outputs->set_active(false);
+ m_limit_output_ports->set_flags(Gtk::CAN_FOCUS);
+ m_limit_output_ports->set_relief(Gtk::RELIEF_NORMAL);
+ m_limit_output_ports->set_mode(true);
+ m_limit_output_ports->set_active(false);
+ m_output_limit_count->set_flags(Gtk::CAN_FOCUS);
+ m_output_limit_count->set_update_policy(Gtk::UPDATE_ALWAYS);
+ m_output_limit_count->set_numeric(false);
+ m_output_limit_count->set_digits(0);
+ m_output_limit_count->set_wrap(false);
+ output_port_limit_hbox->pack_start(*m_limit_output_ports, Gtk::PACK_SHRINK, 0);
+ output_port_limit_hbox->pack_start(*m_output_limit_count);
+ output_port_hbox->pack_start(*m_connect_outputs, Gtk::PACK_SHRINK, 0);
+ output_port_hbox->pack_start(*output_port_limit_hbox, Gtk::PACK_EXPAND_PADDING, 0);
+ m_connect_outputs_to_master->set_flags(Gtk::CAN_FOCUS);
+ m_connect_outputs_to_master->set_relief(Gtk::RELIEF_NORMAL);
+ m_connect_outputs_to_master->set_mode(true);
+ m_connect_outputs_to_master->set_active(false);
+ m_connect_outputs_to_physical->set_flags(Gtk::CAN_FOCUS);
+ m_connect_outputs_to_physical->set_relief(Gtk::RELIEF_NORMAL);
+ m_connect_outputs_to_physical->set_mode(true);
+ m_connect_outputs_to_physical->set_active(false);
+ output_conn_vbox->pack_start(*m_connect_outputs_to_master, Gtk::PACK_SHRINK, 0);
+ output_conn_vbox->pack_start(*m_connect_outputs_to_physical, Gtk::PACK_SHRINK, 0);
+ output_vbox->pack_start(*output_port_hbox);
+ output_vbox->pack_start(*output_conn_vbox);
+ output_port_alignment->add(*output_vbox);
+ output_label->set_alignment(0.5,0.5);
+ output_label->set_padding(0,0);
+ output_label->set_justify(Gtk::JUSTIFY_LEFT);
+ output_label->set_line_wrap(false);
+ output_label->set_use_markup(true);
+ output_label->set_selectable(false);
+ output_frame->set_shadow_type(Gtk::SHADOW_NONE);
+ output_frame->set_label_align(0,0.5);
+ output_frame->add(*output_port_alignment);
+ output_frame->set_label_widget(*output_label);
+ advanced_vbox->pack_start(*advanced_table, Gtk::PACK_SHRINK, 0);
+ advanced_vbox->pack_start(*options_label, Gtk::PACK_SHRINK, 14);
+ advanced_vbox->pack_start(*input_frame);
+ advanced_vbox->pack_start(*output_frame);
+ advanced_label->set_alignment(0.5,0.5);
+ advanced_label->set_padding(0,0);
+ advanced_label->set_justify(Gtk::JUSTIFY_LEFT);
+ advanced_label->set_line_wrap(false);
+ advanced_label->set_use_markup(true);
+ advanced_label->set_selectable(false);
+ advanced_expander->set_flags(Gtk::CAN_FOCUS);
+ advanced_expander->set_border_width(10);
+ advanced_expander->set_expanded(true);
+ advanced_expander->set_spacing(0);
+ advanced_expander->add(*advanced_vbox);
+ advanced_expander->set_label_widget(*advanced_label);
+ new_session_table->set_border_width(5);
+ new_session_table->set_row_spacings(1);
+ new_session_table->set_col_spacings(1);
+ new_session_table->attach(*session_name_label, 0, 1, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+ new_session_table->attach(*m_name, 1, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+ new_session_table->attach(*session_location_label, 0, 1, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+ new_session_table->attach(*m_folder, 1, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+ new_session_table->attach(*session_template_label, 0, 1, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+ new_session_table->attach(*m_template, 1, 2, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+ new_session_table->attach(*advanced_expander, 0, 2, 3, 4, Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+ chan_count_label->set_alignment(0.5,0.5);
+ chan_count_label->set_padding(0,0);
+ chan_count_label->set_justify(Gtk::JUSTIFY_LEFT);
+ chan_count_label->set_line_wrap(false);
+ chan_count_label->set_use_markup(false);
+ chan_count_label->set_selectable(false);
+ open_session_hbox->pack_start(*m_open_filechooser);
+ open_session_alignment->add(*open_session_hbox);
+ open_sesion_label->set_alignment(0.5,0.5);
+ open_sesion_label->set_padding(0,0);
+ open_sesion_label->set_justify(Gtk::JUSTIFY_LEFT);
+ open_sesion_label->set_line_wrap(false);
+ open_sesion_label->set_use_markup(false);
+ open_sesion_label->set_selectable(false);
+ open_session_frame->set_border_width(10);
+ open_session_frame->set_shadow_type(Gtk::SHADOW_IN);
+ open_session_frame->set_label_align(0,0.5);
+ open_session_frame->add(*open_session_alignment);
+ open_session_frame->set_label_widget(*open_sesion_label);
+ m_treeview->set_flags(Gtk::CAN_FOCUS);
+ m_treeview->set_headers_visible(true);
+ m_treeview->set_rules_hint(false);
+ m_treeview->set_reorderable(false);
+ m_treeview->set_enable_search(true);
+ m_treeview->set_fixed_height_mode(false);
+ m_treeview->set_hover_selection(false);
+ m_treeview->set_hover_expand(true);
+ recent_scrolledwindow->set_flags(Gtk::CAN_FOCUS);
+ recent_scrolledwindow->set_border_width(10);
+ recent_scrolledwindow->set_shadow_type(Gtk::SHADOW_IN);
+ recent_scrolledwindow->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
+ recent_scrolledwindow->property_window_placement().set_value(Gtk::CORNER_TOP_LEFT);
+ recent_scrolledwindow->add(*m_treeview);
+ recent_alignment->add(*recent_scrolledwindow);
+ recent_sesion_label->set_alignment(0.5,0.5);
+ recent_sesion_label->set_padding(0,0);
+ recent_sesion_label->set_justify(Gtk::JUSTIFY_LEFT);
+ recent_sesion_label->set_line_wrap(false);
+ recent_sesion_label->set_use_markup(false);
+ recent_sesion_label->set_selectable(false);
+ recent_frame->set_border_width(10);
+ recent_frame->set_shadow_type(Gtk::SHADOW_IN);
+ recent_frame->set_label_align(0,0.5);
+ recent_frame->add(*recent_alignment);
+ recent_frame->set_label_widget(*recent_sesion_label);
+ open_session_vbox->pack_start(*open_session_frame, Gtk::PACK_SHRINK, 0);
+ open_session_vbox->pack_start(*recent_frame, Gtk::PACK_EXPAND_WIDGET, 5);
+ m_notebook->set_flags(Gtk::CAN_FOCUS);
+ m_notebook->set_show_tabs(true);
+ m_notebook->set_show_border(true);
+ m_notebook->set_tab_pos(Gtk::POS_TOP);
+ m_notebook->set_scrollable(false);
+ m_notebook->append_page(*new_session_table, _("New Session"));
+ m_notebook->pages().back().set_tab_label_packing(false, true, Gtk::PACK_START);
+ m_notebook->append_page(*open_session_vbox, _("Open Session"));
+ m_notebook->pages().back().set_tab_label_packing(false, true, Gtk::PACK_START);
+ get_vbox()->set_homogeneous(false);
+ get_vbox()->set_spacing(0);
+ get_vbox()->pack_start(*m_notebook, Gtk::PACK_SHRINK, 0);
+ set_title(_("Create New Session"));
+ //set_modal(false);
+ //property_window_position().set_value(Gtk::WIN_POS_NONE);
+ set_resizable(false);
+ //property_destroy_with_parent().set_value(false);
+ set_has_separator(true);
+ // add_button(Gtk::Stock::HELP, Gtk::RESPONSE_HELP);
+ add_button(Gtk::Stock::QUIT, Gtk::RESPONSE_CANCEL);
+ add_button(Gtk::Stock::CLEAR, Gtk::RESPONSE_NONE);
+ m_okbutton = add_button(Gtk::Stock::NEW, Gtk::RESPONSE_OK);
+ show_all_children();
if (m_treeview) {
recent_model = Gtk::TreeStore::create (recent_columns);
@@ -330,16 +330,17 @@ NewSessionDialog::NewSessionDialog()
}
- std::string path = ARDOUR::get_user_ardour_path() + X_("templates/");
- if (path == Glib::ustring()) {
- path = ARDOUR::get_system_data_path() + X_("templates/");
+ std::string path = ARDOUR::get_user_ardour_path();
+ if (path.empty()) {
+ path = ARDOUR::get_system_data_path();
}
- if (path != Glib::ustring()) {
- m_template->set_current_folder (path);
+ if (!path.empty()) {
+ m_template->set_current_folder (path + X_("templates/"));
}
m_template->set_show_hidden (true);
+ set_default_response (Gtk::RESPONSE_OK);
set_response_sensitive (Gtk::RESPONSE_OK, false);
- set_response_sensitive (0, false);
+ set_response_sensitive (Gtk::RESPONSE_NONE, false);
m_notebook->show_all_children();
m_notebook->set_current_page(0);
@@ -505,8 +506,8 @@ NewSessionDialog::get_current_page()
void
NewSessionDialog::reset_name()
{
- m_name->set_text(Glib::ustring());
- m_new_session_dialog->set_response_sensitive (Gtk::RESPONSE_OK, false);
+ m_name->set_text("");
+ set_response_sensitive (Gtk::RESPONSE_OK, false);
}
@@ -515,6 +516,7 @@ NewSessionDialog::entry_key_release (GdkEventKey* ev)
{
if (m_name->get_text() != "") {
set_response_sensitive (Gtk::RESPONSE_OK, true);
+ set_response_sensitive (Gtk::RESPONSE_NONE, true);
} else {
set_response_sensitive (Gtk::RESPONSE_OK, false);
}
@@ -525,16 +527,20 @@ void
NewSessionDialog::notebook_page_changed (GtkNotebookPage* np, uint pagenum)
{
if (pagenum == 1) {
- // m_okbutton->set_label(_("Open"));
- //m_okbutton->set_image (*(new Gtk::Image (Gtk::Stock::OPEN, Gtk::ICON_SIZE_BUTTON)));
- if (m_treeview->get_selection()->count_selected_rows() == 0) {
+ m_okbutton->set_label(_("Open"));
+ set_response_sensitive (Gtk::RESPONSE_NONE, false);
+ m_okbutton->set_image (*(new Gtk::Image (Gtk::Stock::OPEN, Gtk::ICON_SIZE_BUTTON)));
+ if (m_treeview->get_selection()->count_selected_rows() == 0) {
set_response_sensitive (Gtk::RESPONSE_OK, false);
} else {
set_response_sensitive (Gtk::RESPONSE_OK, true);
}
} else {
- // m_okbutton->set_label(_("New"));
- // m_okbutton->set_image (*(new Gtk::Image (Gtk::Stock::NEW, Gtk::ICON_SIZE_BUTTON)));
+ if (m_name->get_text() != "") {
+ set_response_sensitive (Gtk::RESPONSE_NONE, true);
+ }
+ m_okbutton->set_label(_("New"));
+ m_okbutton->set_image (*(new Gtk::Image (Gtk::Stock::NEW, Gtk::ICON_SIZE_BUTTON)));
if (m_name->get_text() == "") {
set_response_sensitive (Gtk::RESPONSE_OK, false);
} else {
@@ -571,9 +577,9 @@ void
NewSessionDialog::template_chosen ()
{
if (m_template->get_filename() != "" ) {;
- m_new_session_dialog->set_response_sensitive (0, true);
+ set_response_sensitive (Gtk::RESPONSE_NONE, true);
} else {
- m_new_session_dialog->set_response_sensitive (0, false);
+ set_response_sensitive (Gtk::RESPONSE_NONE, false);
}
}
@@ -587,72 +593,72 @@ NewSessionDialog::recent_row_activated (const Gtk::TreePath& path, Gtk::TreeView
void
NewSessionDialog::reset_template()
{
- m_template->set_filename("");
+ m_template->set_filename("");
}
void
NewSessionDialog::reset_recent()
{
- /* Shamelessly ripped from ardour_ui.cc */
- std::vector<string *> *sessions;
- std::vector<string *>::iterator i;
- RecentSessionsSorter cmp;
-
- recent_model->clear ();
-
- ARDOUR::RecentSessions rs;
- ARDOUR::read_recent_sessions (rs);
+ /* Shamelessly ripped from ardour_ui.cc */
+ std::vector<string *> *sessions;
+ std::vector<string *>::iterator i;
+ RecentSessionsSorter cmp;
+
+ recent_model->clear ();
+
+ ARDOUR::RecentSessions rs;
+ ARDOUR::read_recent_sessions (rs);
+
+ /* sort them alphabetically */
+ sort (rs.begin(), rs.end(), cmp);
+ sessions = new std::vector<std::string*>;
+
+ for (ARDOUR::RecentSessions::iterator i = rs.begin(); i != rs.end(); ++i) {
+ sessions->push_back (new string ((*i).second));
+ }
+
+ for (i = sessions->begin(); i != sessions->end(); ++i) {
+
+ std::vector<std::string*>* states;
+ std::vector<const gchar*> item;
+ std::string fullpath = *(*i);
- /* sort them alphabetically */
- sort (rs.begin(), rs.end(), cmp);
- sessions = new std::vector<std::string*>;
+ /* remove any trailing / */
- for (ARDOUR::RecentSessions::iterator i = rs.begin(); i != rs.end(); ++i) {
- sessions->push_back (new string ((*i).second));
+ if (fullpath[fullpath.length()-1] == '/') {
+ fullpath = fullpath.substr (0, fullpath.length()-1);
}
-
- for (i = sessions->begin(); i != sessions->end(); ++i) {
-
- std::vector<std::string*>* states;
- std::vector<const gchar*> item;
- std::string fullpath = *(*i);
-
- /* remove any trailing / */
-
- if (fullpath[fullpath.length()-1] == '/') {
- fullpath = fullpath.substr (0, fullpath.length()-1);
- }
- /* now get available states for this session */
+ /* now get available states for this session */
- if ((states = ARDOUR::Session::possible_states (fullpath)) == 0) {
- /* no state file? */
- continue;
- }
+ if ((states = ARDOUR::Session::possible_states (fullpath)) == 0) {
+ /* no state file? */
+ continue;
+ }
- Gtk::TreeModel::Row row = *(recent_model->append());
-
- row[recent_columns.visible_name] = PBD::basename (fullpath);
- row[recent_columns.fullpath] = fullpath;
-
- if (states->size() > 1) {
+ Gtk::TreeModel::Row row = *(recent_model->append());
+
+ row[recent_columns.visible_name] = PBD::basename (fullpath);
+ row[recent_columns.fullpath] = fullpath;
+
+ if (states->size() > 1) {
- /* add the children */
+ /* add the children */
- for (std::vector<std::string*>::iterator i2 = states->begin(); i2 != states->end(); ++i2) {
-
- Gtk::TreeModel::Row child_row = *(recent_model->append (row.children()));
-
- child_row[recent_columns.visible_name] = **i2;
- child_row[recent_columns.fullpath] = fullpath;
-
- delete *i2;
- }
- }
-
- delete states;
+ for (std::vector<std::string*>::iterator i2 = states->begin(); i2 != states->end(); ++i2) {
+
+ Gtk::TreeModel::Row child_row = *(recent_model->append (row.children()));
+
+ child_row[recent_columns.visible_name] = **i2;
+ child_row[recent_columns.fullpath] = fullpath;
+
+ delete *i2;
+ }
}
- delete sessions;
+
+ delete states;
+ }
+ delete sessions;
}
void
@@ -660,4 +666,5 @@ NewSessionDialog::reset()
{
reset_name();
reset_template();
+ set_response_sensitive (Gtk::RESPONSE_NONE, false);
}