Prompt the user for confirmation before removing an export preset

Requested by Radio SRB (http://srb.fm)
This commit is contained in:
Adrian Knoth 2013-06-19 19:05:46 +02:00
parent 9334914137
commit db7bd7ca58
1 changed files with 12 additions and 0 deletions

View File

@ -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 ();