summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/gtkmm2ext/paths_dialog.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/gtkmm2ext/paths_dialog.cc b/libs/gtkmm2ext/paths_dialog.cc
index 9f06562617..1f3a3b5de6 100644
--- a/libs/gtkmm2ext/paths_dialog.cc
+++ b/libs/gtkmm2ext/paths_dialog.cc
@@ -107,6 +107,12 @@ 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 ();