37 , chooser (
_(
"Select a folder to search"), FILE_CHOOSER_ACTION_SELECT_FOLDER)
38 , use_chosen (
_(
"Add chosen folder to search path, and try again"))
39 , choice_group (use_chosen.get_group())
40 , stop_loading_button (choice_group,
_(
"Stop loading this session"), false)
41 , all_missing_ok (choice_group,
_(
"Skip all missing files"), false)
42 , this_missing_ok (choice_group,
_(
"Skip this file"), false)
46 add_button (
_(
"Done"), RESPONSE_OK);
47 set_default_response (RESPONSE_OK);
61 vector<string>::iterator i = source_dirs.begin();
65 while (++i != source_dirs.end()) {
69 msg.set_justify (JUSTIFY_LEFT);
70 msg.set_markup (
string_compose (
_(
"%1 cannot find the %2 file\n\n<i>%3</i>\n\nin any of these folders:\n\n\
71 <tt>%4</tt>\n\n"), PROGRAM_NAME, typestr, Glib::Markup::escape_text(path), Glib::Markup::escape_text (oss.str())));
73 HBox* hbox = manage (
new HBox);
74 hbox->pack_start (
msg,
false,
true);
77 get_vbox()->pack_start (*hbox,
false,
false);
79 VBox* button_packer_box = manage (
new VBox);
81 button_packer_box->set_spacing (6);
82 button_packer_box->set_border_width (12);
84 button_packer_box->pack_start (
use_chosen,
false,
false);
89 button_packer_box->show_all ();
91 get_vbox()->set_spacing (6);
92 get_vbox()->set_border_width (25);
93 get_vbox()->set_homogeneous (
false);
96 hbox = manage (
new HBox);
97 hbox->pack_start (*button_packer_box,
false,
true);
100 get_vbox()->pack_start (*hbox,
false,
false);
102 hbox = manage (
new HBox);
103 Label* label = manage (
new Label);
104 label->set_text (
_(
"Click to choose an additional folder"));
106 hbox->set_spacing (6);
107 hbox->set_border_width (12);
108 hbox->pack_start (*label,
false,
false);
109 hbox->pack_start (
chooser,
true,
true);
112 get_vbox()->pack_start (*hbox,
true,
true);
116 chooser.set_current_folder (Glib::get_home_dir());
117 chooser.set_create_folders (
false);
128 case DataType::AUDIO:
136 split (str, dirs, G_SEARCHPATH_SEPARATOR);
138 newdir =
chooser.get_filename ();
140 for (vector<string>::iterator d = dirs.begin(); d != dirs.end(); d++) {
147 str += G_SEARCHPATH_SEPARATOR;
153 case DataType::AUDIO:
Gtk::RadioButton this_missing_ok
LIBPBD_API void split(std::string, std::vector< std::string > &, char)
SessionConfiguration config
ARDOUR::DataType filetype
Gtk::RadioButton stop_loading_button
Gtk::RadioButton all_missing_ok
Gtk::RadioButton use_chosen
std::vector< std::string > source_search_path(DataType) const
MissingFileDialog(ARDOUR::Session *, const std::string &path, ARDOUR::DataType type)
Gtk::FileChooserButton chooser
virtual void set_session(ARDOUR::Session *)
ARDOUR::Session * _session
std::string string_compose(const std::string &fmt, const T1 &o1)