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
This commit is contained in:
parent
b05c4dc540
commit
e0991be04d
@ -483,7 +483,6 @@ OptionEditor::mtc_port_chosen (MIDI::Port *port, Gtk::RadioButton* rb)
|
||||
{
|
||||
if (session) {
|
||||
if (rb->get_active()) {
|
||||
cerr << "Activating MTC port " << port->name() << endl;
|
||||
if (port) {
|
||||
session->set_mtc_port (port->name());
|
||||
Config->set_mtc_port_name (port->name());
|
||||
@ -500,7 +499,6 @@ OptionEditor::mmc_port_chosen (MIDI::Port* port, Gtk::RadioButton* rb)
|
||||
{
|
||||
if (session) {
|
||||
if (rb->get_active()) {
|
||||
cerr << "Activating MMC port " << port->name() << endl;
|
||||
if (port) {
|
||||
session->set_mmc_port (port->name());
|
||||
Config->set_mtc_port_name (port->name());
|
||||
@ -517,7 +515,6 @@ OptionEditor::midi_port_chosen (MIDI::Port* port, Gtk::RadioButton* rb)
|
||||
{
|
||||
if (session) {
|
||||
if (rb->get_active()) {
|
||||
cerr << "Activating MIDI port " << port->name() << endl;
|
||||
if (port) {
|
||||
session->set_midi_port (port->name());
|
||||
Config->set_midi_port_name (port->name());
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -88,7 +88,7 @@ class SoundFileBrowser : public ArdourDialog
|
||||
{
|
||||
public:
|
||||
SoundFileBrowser (std::string title, ARDOUR::Session* _s = 0);
|
||||
virtual ~SoundFileBrowser () {};
|
||||
virtual ~SoundFileBrowser ();
|
||||
|
||||
virtual void set_session (ARDOUR::Session*);
|
||||
|
||||
@ -96,7 +96,9 @@ class SoundFileBrowser : public ArdourDialog
|
||||
Gtk::FileChooserWidget chooser;
|
||||
Gtk::FileFilter filter;
|
||||
SoundFileBox preview;
|
||||
|
||||
|
||||
static Glib::ustring persistent_folder;
|
||||
|
||||
class FoundTagColumns : public Gtk::TreeModel::ColumnRecord
|
||||
{
|
||||
public:
|
||||
@ -110,7 +112,7 @@ class SoundFileBrowser : public ArdourDialog
|
||||
Gtk::TreeView found_list_view;
|
||||
Gtk::Entry found_entry;
|
||||
Gtk::Button found_search_btn;
|
||||
|
||||
|
||||
Gtk::Notebook notebook;
|
||||
|
||||
void update_preview ();
|
||||
|
Loading…
Reference in New Issue
Block a user