- for (CinemaMap::iterator i = _selected_cinemas.begin(); i != _selected_cinemas.end(); ++i) {
- Config::instance()->remove_cinema (i->second);
- _targets->Delete (i->first);
+ if (_selected_cinemas.size() == 1) {
+ if (!confirm_dialog(this, wxString::Format(_("Are you sure you want to remove the cinema '%s'?"), std_to_wx(_selected_cinemas.begin()->second->name)))) {
+ return;
+ }
+ } else {
+ if (!confirm_dialog(this, wxString::Format(_("Are you sure you want to remove %d cinemas?"), int(_selected_cinemas.size())))) {
+ return;
+ }
+ }
+
+ for (auto const& i: _selected_cinemas) {
+ Config::instance()->remove_cinema (i.second);
+ _targets->Delete (i.first);