Wrap calls to add_shortcut_folder() in try { ... } block.
authorColin Fletcher <colin.m.fletcher@googlemail.com>
Fri, 19 Jul 2013 11:04:58 +0000 (12:04 +0100)
committerPaul Davis <paul@linuxaudiosystems.com>
Thu, 8 Aug 2013 19:23:11 +0000 (15:23 -0400)
commit5ccd13ea789b8b6bffe292565ce793ebc616fcd2
treea5a7071435d750af55c92c2d732f3a5469bbb589
parentba0b825d02f8d59909697b4168fd4b44c458434e
Wrap calls to add_shortcut_folder() in try { ... } block.

Gtk::FileChooserButton::add_shortcut_folder() throws a Glib::Error
exception if the folder being added already has a shortcut, causing the
'New session' dialogue to appear empty when choosing 'New...' from the
Session menu. This happens if Ardour's default session folder is
set to a location that has a standard shortcut in the Gtk file chooser,
e.g. the user's home directory, desktop, &c.

Catch the exception in ArdourStartup::setup_new_session_page(), so that the
'New session' dialogue appears as expected, and likewise in
ARDOUR_UI::open_session() to avoid a similar problem there.

Fixes #5591.
gtk2_ardour/ardour_ui.cc
gtk2_ardour/startup.cc