projects
/
ardour.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
732d58b
)
paths dialog: use selection as default when adding new dirs
author
Robin Gareus
<robin@gareus.org>
Sat, 8 Mar 2014 17:28:16 +0000
(18:28 +0100)
committer
Robin Gareus
<robin@gareus.org>
Sat, 8 Mar 2014 17:28:16 +0000
(18:28 +0100)
libs/gtkmm2ext/paths_dialog.cc
patch
|
blob
|
history
diff --git
a/libs/gtkmm2ext/paths_dialog.cc
b/libs/gtkmm2ext/paths_dialog.cc
index 9f06562617e2a19c66917afb05d8e1e643937e0b..1f3a3b5de640add4436e44e07caa10da000740cf 100644
(file)
--- 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 ();