X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fardour_ui.cc;h=d9ac37e36f5c94b038def8a136da7cfaa70746d4;hb=237741d18722252abd4a6a20d3422315481ccffe;hp=ebdbc0651788fc11dbbdb9d7e357785cf9979829;hpb=3131ab8bbd9f57b6c59ff0a13460db634d5dafee;p=ardour.git diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index ebdbc06517..d9ac37e36f 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -50,6 +50,7 @@ #include "pbd/enumwriter.h" #include "pbd/memento_command.h" #include "pbd/openuri.h" +#include "pbd/stl_delete.h" #include "pbd/file_utils.h" #include "pbd/localtime_r.h" @@ -755,6 +756,7 @@ ARDOUR_UI::starting () try { audio_midi_setup.get (true); } catch (...) { + std::cerr << "audio-midi engine setup failed."<< std::endl; return -1; } @@ -841,6 +843,7 @@ ARDOUR_UI::starting () const bool new_session_required = (ARDOUR_COMMAND_LINE::new_session || brand_new_user); if (get_session_parameters (false, new_session_required, ARDOUR_COMMAND_LINE::load_template)) { + std::cerr << "Cannot get session parameters."<< std::endl; return -1; } } @@ -1413,7 +1416,7 @@ ARDOUR_UI::redisplay_recent_sessions () get_state_files_in_directory (*i, state_file_paths); - vector* states; + vector states; vector item; string fullpath = *i; @@ -1430,8 +1433,9 @@ ARDOUR_UI::redisplay_recent_sessions () } /* now get available states for this session */ + states = Session::possible_states (fullpath); - if ((states = Session::possible_states (fullpath)) == 0) { + if (states.empty()) { /* no state file? */ continue; } @@ -1440,14 +1444,14 @@ ARDOUR_UI::redisplay_recent_sessions () Gtk::TreeModel::Row row = *(recent_session_model->append()); - row[recent_session_columns.visible_name] = Glib::path_get_basename (fullpath); row[recent_session_columns.fullpath] = fullpath; row[recent_session_columns.tip] = Glib::Markup::escape_text (fullpath); if (state_file_names.size() > 1) { + // multiple session files in the session directory - show the directory name. + row[recent_session_columns.visible_name] = Glib::path_get_basename (fullpath); // add the children - for (std::vector::iterator i2 = state_file_names.begin(); i2 != state_file_names.end(); ++i2) { @@ -1458,6 +1462,9 @@ ARDOUR_UI::redisplay_recent_sessions () child_row[recent_session_columns.fullpath] = fullpath; child_row[recent_session_columns.tip] = Glib::Markup::escape_text (fullpath); } + } else { + // only a single session file in the directory - show its actual name. + row[recent_session_columns.visible_name] = state_file_names.front (); } } @@ -3384,8 +3391,6 @@ ARDOUR_UI::add_route (Gtk::Window* float_window) setup_order_hint(); - PBD::ScopedConnection idle_connection; - string template_path = add_route_dialog->track_template(); if (!template_path.empty()) { @@ -3427,8 +3432,6 @@ ARDOUR_UI::add_route (Gtk::Window* float_window) session_add_audio_bus (input_chan.n_audio(), output_chan.n_audio(), route_group, count, name_template); break; } - - /* idle connection will end at scope end */ } void @@ -3555,6 +3558,7 @@ ARDOUR_UI::start_video_server (Gtk::Window* float_window, bool popup_msg) int timeout = 120; // 6 sec while (!ARDOUR_UI::instance()->video_timeline->check_server()) { Glib::usleep (50000); + gui_idle_handler(); if (--timeout <= 0 || !video_server_process->is_running()) break; } if (timeout <= 0) {