Fix one occurence of 'Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.'

This commit is contained in:
heckflosse 2018-04-04 17:09:08 +02:00
parent 302a2f217e
commit 426380e8d1

View File

@ -942,9 +942,8 @@ void FileCatalog::deleteRequested (std::vector<FileBrowserEntry*> tbe, bool inc
return; return;
} }
Gtk::MessageDialog msd (M("FILEBROWSER_DELETEDLGLABEL"), true, Gtk::MESSAGE_QUESTION, Gtk::BUTTONS_YES_NO, true); Gtk::MessageDialog msd (getToplevelWindow(this), M("FILEBROWSER_DELETEDLGLABEL"), true, Gtk::MESSAGE_QUESTION, Gtk::BUTTONS_YES_NO, true);
msd.set_secondary_text(Glib::ustring::compose ( inclBatchProcessed ? M("FILEBROWSER_DELETEDLGMSGINCLPROC") : M("FILEBROWSER_DELETEDLGMSG"), tbe.size()), true); msd.set_secondary_text(Glib::ustring::compose ( inclBatchProcessed ? M("FILEBROWSER_DELETEDLGMSGINCLPROC") : M("FILEBROWSER_DELETEDLGMSG"), tbe.size()), true);
if (msd.run() == Gtk::RESPONSE_YES) { if (msd.run() == Gtk::RESPONSE_YES) {
for (unsigned int i = 0; i < tbe.size(); i++) { for (unsigned int i = 0; i < tbe.size(); i++) {
const auto fname = tbe[i]->filename; const auto fname = tbe[i]->filename;