X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=gtk2_ardour%2Fexport_preset_selector.cc;h=6adf5a45be28ed0bcd3311112211eac175466b1f;hb=4f5ca7ecb5b7230f54e123339f7bc05e752bbc96;hp=3898916bc05899d767ec871c5a8accf20ad62f97;hpb=5c4f7313ef3f5f56dbc5777a0f78061c5472b29e;p=ardour.git diff --git a/gtk2_ardour/export_preset_selector.cc b/gtk2_ardour/export_preset_selector.cc index 3898916bc0..6adf5a45be 100644 --- a/gtk2_ardour/export_preset_selector.cc +++ b/gtk2_ardour/export_preset_selector.cc @@ -123,8 +123,8 @@ ExportPresetSelector::update_selection () } } - save_button.set_sensitive (current); - remove_button.set_sensitive (current); + save_button.set_sensitive (current != 0); + remove_button.set_sensitive (current != 0); new_button.set_sensitive (!current && !text.empty() && !preset_name_exists); } @@ -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 ();