summaryrefslogtreecommitdiff
path: root/gtk2_ardour/sfdb_ui.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2007-02-01 19:53:58 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2007-02-01 19:53:58 +0000
commite0991be04d5fad5715a90b1fa6e38bcb5a0e5bce (patch)
treeab1be8c0422d5fdeaac4a2ed5e071d660ce20548 /gtk2_ardour/sfdb_ui.cc
parentb05c4dc540d0f9f97975a0d6ff9c3cd8a569b980 (diff)
add a persistent folder variable so that every time the sfdb_ui is created, it shows the same location that it was left in
git-svn-id: svn://localhost/ardour2/trunk@1404 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/sfdb_ui.cc')
-rw-r--r--gtk2_ardour/sfdb_ui.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/gtk2_ardour/sfdb_ui.cc b/gtk2_ardour/sfdb_ui.cc
index cb91fcba6b..00c33bf8ef 100644
--- a/gtk2_ardour/sfdb_ui.cc
+++ b/gtk2_ardour/sfdb_ui.cc
@@ -50,6 +50,8 @@ using namespace ARDOUR;
using namespace PBD;
using namespace std;
+Glib::ustring SoundFileBrowser::persistent_folder;
+
SoundFileBox::SoundFileBox ()
:
_session(0),
@@ -308,6 +310,11 @@ SoundFileBrowser::SoundFileBrowser (string title, ARDOUR::Session* s)
chooser.set_filter (filter);
chooser.set_select_multiple (true);
chooser.signal_update_preview().connect(mem_fun(*this, &SoundFileBrowser::update_preview));
+
+ if (!persistent_folder.empty()) {
+ chooser.set_current_folder (persistent_folder);
+ }
+
found_list_view.get_selection()->signal_changed().connect(mem_fun(*this, &SoundFileBrowser::found_list_view_selected));
found_search_btn.signal_clicked().connect(mem_fun(*this, &SoundFileBrowser::found_search_clicked));
@@ -318,6 +325,11 @@ SoundFileBrowser::SoundFileBrowser (string title, ARDOUR::Session* s)
set_session (s);
}
+SoundFileBrowser::~SoundFileBrowser ()
+{
+ persistent_folder = chooser.get_current_folder();
+}
+
void
SoundFileBrowser::set_session (Session* s)
{
@@ -548,3 +560,4 @@ SoundFileOmega::mode_changed ()
break;
}
}
+