13
0

use API to add system-specific volumes - #6643

This commit is contained in:
Robin Gareus 2015-10-16 19:07:25 +02:00
parent 2c9666e0ee
commit 23b975e172
3 changed files with 4 additions and 10 deletions

View File

@ -1700,11 +1700,9 @@ ARDOUR_UI::open_session ()
open_session_selector.set_current_folder(Config->get_default_session_parent_dir());
}
Gtkmm2ext::add_volume_shortcuts (open_session_selector);
try {
/* add_shortcut_folder throws an exception if the folder being added already has a shortcut */
#ifdef GTKOSX
open_session_selector.add_shortcut_folder_uri("file:///Volumes");
#endif
string default_session_folder = Config->get_default_session_parent_dir();
open_session_selector.add_shortcut_folder (default_session_folder);
}

View File

@ -397,9 +397,7 @@ SessionDialog::setup_initial_choice_box ()
existing_session_chooser.add_filter (session_filter);
existing_session_chooser.set_filter (session_filter);
#ifdef GTKOSX
existing_session_chooser.add_shortcut_folder ("/Volumes");
#endif
Gtkmm2ext::add_volume_shortcuts (existing_session_chooser);
Label* browse_label = manage (new Label);
browse_label->set_markup (string_compose ("<span weight=\"bold\" size=\"large\">%1</span>", _("Other Sessions")));
@ -540,9 +538,7 @@ SessionDialog::setup_new_session_page ()
new_folder_chooser.show ();
new_folder_chooser.set_title (_("Select folder for session"));
#ifdef __APPLE__
new_folder_chooser.add_shortcut_folder ("/Volumes");
#endif
Gtkmm2ext::add_volume_shortcuts (new_folder_chooser);
vbox1->pack_start (*hbox2, false, false);

View File

@ -566,12 +566,12 @@ SoundFileBrowser::SoundFileBrowser (string title, ARDOUR::Session* s, bool persi
chooser.add_shortcut_folder_uri("file:///Library/GarageBand/Apple Loops");
chooser.add_shortcut_folder_uri("file:///Library/Audio/Apple Loops");
chooser.add_shortcut_folder_uri("file:///Library/Application Support/GarageBand/Instrument Library/Sampler/Sampler Files");
chooser.add_shortcut_folder_uri("file:///Volumes");
}
catch (Glib::Error & e) {
std::cerr << "sfdb.add_shortcut_folder() threw Glib::Error " << e.what() << std::endl;
}
#endif
Gtkmm2ext::add_volume_shortcuts (chooser);
//add the file chooser