summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2015-09-06 18:15:48 +0200
committerRobin Gareus <robin@gareus.org>2015-09-06 18:15:48 +0200
commit53cdc8046f0f92eb400ce99bc4e461bae2117976 (patch)
tree8845ce99710eb24785499b867dfe822af4acc361 /gtk2_ardour
parent2309bb2a7f3ed71bdc2dbc828246aea53b9fa160 (diff)
catch duplicate shortcut folders.
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/sfdb_ui.cc14
1 files changed, 10 insertions, 4 deletions
diff --git a/gtk2_ardour/sfdb_ui.cc b/gtk2_ardour/sfdb_ui.cc
index 3f1d93fb4c..ed1cfd44ca 100644
--- a/gtk2_ardour/sfdb_ui.cc
+++ b/gtk2_ardour/sfdb_ui.cc
@@ -560,10 +560,16 @@ SoundFileBrowser::SoundFileBrowser (string title, ARDOUR::Session* s, bool persi
{
#ifdef GTKOSX
- 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");
+ try {
+ /* add_shortcut_folder throws an exception if the folder being added already has a shortcut */
+ 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
//add the file chooser