diff options
author | Adrian Knoth <adi@drcomp.erfurt.thur.de> | 2013-06-19 19:05:46 +0200 |
---|---|---|
committer | Adrian Knoth <adi@drcomp.erfurt.thur.de> | 2013-06-19 19:05:46 +0200 |
commit | db7bd7ca58739152a26ed1be2a88fa568cda0d81 (patch) | |
tree | 5fcece7885105ab3ceeed7cfe143bbac4263cd67 /gtk2_ardour/export_preset_selector.cc | |
parent | 93349141379343c91ea0ec2127d694f6cf2e230e (diff) |
Prompt the user for confirmation before removing an export preset
Requested by Radio SRB (http://srb.fm)
Diffstat (limited to 'gtk2_ardour/export_preset_selector.cc')
-rw-r--r-- | gtk2_ardour/export_preset_selector.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gtk2_ardour/export_preset_selector.cc b/gtk2_ardour/export_preset_selector.cc index 3898916bc0..9f699bbb80 100644 --- a/gtk2_ardour/export_preset_selector.cc +++ b/gtk2_ardour/export_preset_selector.cc @@ -153,6 +153,18 @@ ExportPresetSelector::remove_current () { if (!profile_manager) { return; } + Gtk::MessageDialog dialog (_("Do you really want to remove this preset?"), + false, + Gtk::MESSAGE_QUESTION, + Gtk::BUTTONS_YES_NO); + + if (Gtk::RESPONSE_YES != dialog.run ()) { + /* User has selected "no" or closed the dialog, better + * abort + */ + return; + } + profile_manager->remove_preset(); entry.get_entry()->set_text (""); sync_with_manager (); |