#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"
try {
audio_midi_setup.get (true);
} catch (...) {
+ std::cerr << "audio-midi engine setup failed."<< std::endl;
return -1;
}
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;
}
}
get_state_files_in_directory (*i, state_file_paths);
- vector<string*>* states;
+ vector<string> states;
vector<const gchar*> item;
string fullpath = *i;
}
/* 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;
}
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<std::string>::iterator i2 = state_file_names.begin();
i2 != state_file_names.end(); ++i2)
{
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 ();
}
}
setup_order_hint();
- PBD::ScopedConnection idle_connection;
-
string template_path = add_route_dialog->track_template();
if (!template_path.empty()) {
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
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) {