std::vector <std::string> a = PBD::parse_path(current_paths);
for(vector<std::string>::const_iterator i = a.begin(); i != a.end(); ++i) {
- paths_list_view.append(*i);
+ paths_list_view.append_text(*i);
}
paths_list_view.get_selection()->signal_changed().connect (mem_fun (*this, &PathsDialog::selection_changed));
void
PathsDialog::add_path() {
Gtk::FileChooserDialog d (_("Add folder to search path"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER);
+
+ std::vector<int> selection = paths_list_view.get_selected();
+ if (selection.size() == 1 ) {
+ d.set_current_folder(paths_list_view.get_text(selection.at(0), 0));
+ }
+
d.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
d.add_button(Gtk::Stock::OK, Gtk::RESPONSE_OK);
ResponseType r = (ResponseType) d.run ();
}
}
if (!dup) {
- paths_list_view.prepend(dir);
+ paths_list_view.prepend_text(dir);
}
}
}
paths_list_view.clear_items();
std::vector <std::string> a = PBD::parse_path(_default_paths);
for(vector<std::string>::const_iterator i = a.begin(); i != a.end(); ++i) {
- paths_list_view.append(*i);
+ paths_list_view.append_text(*i);
}
}