throw failed_constructor();
}
- sys::path been_here_before = user_config_directory();
- been_here_before /= ".a3"; // XXXX use more specific version so we can catch upgrades
- new_user = !exists (been_here_before);
+ list<Glib::RefPtr<Gdk::Pixbuf> > window_icons;
+ Glib::RefPtr<Gdk::Pixbuf> icon;
+
+ if ((icon = ::get_icon ("ardour_icon_16px")) != 0) {
+ window_icons.push_back (icon);
+ }
+ if ((icon = ::get_icon ("ardour_icon_22px")) != 0) {
+ window_icons.push_back (icon);
+ }
+ if ((icon = ::get_icon ("ardour_icon_32px")) != 0) {
+ window_icons.push_back (icon);
+ }
+ if ((icon = ::get_icon ("ardour_icon_48px")) != 0) {
+ window_icons.push_back (icon);
+ }
+ if (!window_icons.empty ()) {
+ set_default_icon_list (window_icons);
+ }
+
+ new_user = !exists (been_here_before_path ());
bool need_audio_setup = !EngineControl::engine_running();
setup_alpha_page ();
if (new_user) {
- /* "touch" the file */
- ofstream fout (been_here_before.to_string().c_str());
+
+ /* Create the config directory so that we have somewhere to put the
+ been_here_before file.
+ */
+ try {
+ sys::create_directories (user_config_directory ());
+ }
+ catch (const sys::filesystem_error& ex) {
+ error << "Could not create user configuration directory" << endmsg;
+ }
+
setup_new_user_page ();
setup_first_time_config_page ();
setup_monitoring_choice_page ();
void
ArdourStartup::default_dir_changed ()
{
- Config->set_default_session_parent_dir (default_dir_chooser->get_current_folder());
+ Config->set_default_session_parent_dir (default_dir_chooser->get_filename());
config_changed ();
}
if (config_modified) {
if (default_dir_chooser) {
- Config->set_default_session_parent_dir (default_dir_chooser->get_current_folder());
+ Config->set_default_session_parent_dir (default_dir_chooser->get_filename());
}
if (monitor_via_hardware_button.get_active()) {
Config->set_use_monitor_bus (use_monitor_section_button.get_active());
+ /* "touch" the been-here-before path now that we're about to save Config */
+ ofstream fout (been_here_before_path().to_string().c_str());
+
Config->save_state ();
}
} else {
/* existing session requested */
setup_existing_session_page ();
+
+ }
+
+ /* HACK HACK HACK ... change the "Apply" button label
+ to say "Open"
+ */
+
+ Gtk::Widget* tl = session_vbox.get_toplevel();
+ Gtk::Window* win;
+ if ((win = dynamic_cast<Gtk::Window*>(tl)) != 0) {
+ /* ::get_default_widget() is not wrapped in gtkmm */
+ Gtk::Widget* def = wrap (gtk_window_get_default_widget (win->gobj()));
+ Gtk::Button* button;
+ if ((button = dynamic_cast<Gtk::Button*>(def)) != 0) {
+ if (more_new_session_options_button.get_active()) {
+ button->set_label (_("Forward"));
+ }else{
+ button->set_label (_("Open"));
+ }
+ }
}
}
}
set_page_title (session_vbox, _("New Session"));
set_page_type (session_vbox, ASSISTANT_PAGE_CONFIRM);
+ if (more_new_session_options_button.get_active()) {
+ set_page_type (session_vbox, ASSISTANT_PAGE_CONTENT);
+ }
+
new_name_entry.signal_map().connect (sigc::mem_fun (*this, &ArdourStartup::new_name_mapped));
new_name_entry.signal_focus_out_event().connect (sigc::ptr_fun (lost_name_entry_focus));
}
_connect_inputs.set_flags(Gtk::CAN_FOCUS);
_connect_inputs.set_relief(Gtk::RELIEF_NORMAL);
_connect_inputs.set_mode(true);
- _connect_inputs.set_active(true);
+ _connect_inputs.set_active(Config->get_input_auto_connect() != ManualConnect);
_connect_inputs.set_border_width(0);
_limit_input_ports.set_label (_("Use only"));
_connect_outputs.set_flags(Gtk::CAN_FOCUS);
_connect_outputs.set_relief(Gtk::RELIEF_NORMAL);
_connect_outputs.set_mode(true);
- _connect_outputs.set_active(true);
+ _connect_outputs.set_active(Config->get_output_auto_connect() != ManualConnect);
_connect_outputs.set_border_width(0);
_limit_output_ports.set_label (_("Use only"));
_limit_output_ports.set_flags(Gtk::CAN_FOCUS);
_connect_outputs_to_master.set_flags(Gtk::CAN_FOCUS);
_connect_outputs_to_master.set_relief(Gtk::RELIEF_NORMAL);
_connect_outputs_to_master.set_mode(true);
- _connect_outputs_to_master.set_active(false);
+ _connect_outputs_to_master.set_active(Config->get_output_auto_connect() == AutoConnectMaster);
_connect_outputs_to_master.set_border_width(0);
_connect_outputs_to_master.set_group (connect_outputs_group);
_connect_outputs_to_physical.set_flags(Gtk::CAN_FOCUS);
_connect_outputs_to_physical.set_relief(Gtk::RELIEF_NORMAL);
_connect_outputs_to_physical.set_mode(true);
- _connect_outputs_to_physical.set_active(false);
+ _connect_outputs_to_physical.set_active(Config->get_output_auto_connect() == AutoConnectPhysical);
_connect_outputs_to_physical.set_border_width(0);
output_conn_vbox.pack_start(_connect_outputs, Gtk::PACK_SHRINK, 0);
set_page_complete (session_vbox, true);
move_along_now ();
}
+
+sys::path
+ArdourStartup::been_here_before_path () const
+{
+ sys::path b = user_config_directory();
+ b /= ".a3"; // XXXX use more specific version so we can catch upgrades
+ return b;
+}
+