merge with dev
This commit is contained in:
@@ -943,14 +943,19 @@ void FileCatalog::openRequested(const std::vector<Thumbnail*>& tmb)
|
||||
);
|
||||
}
|
||||
|
||||
void FileCatalog::deleteRequested(const std::vector<FileBrowserEntry*>& tbe, bool inclBatchProcessed)
|
||||
void FileCatalog::deleteRequested(const std::vector<FileBrowserEntry*>& tbe, bool inclBatchProcessed, bool onlySelected)
|
||||
{
|
||||
if (tbe.empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
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);
|
||||
Gtk::MessageDialog msd (getToplevelWindow(this), M("FILEBROWSER_DELETEDIALOG_HEADER"), true, Gtk::MESSAGE_QUESTION, Gtk::BUTTONS_YES_NO, true);
|
||||
if (onlySelected) {
|
||||
msd.set_secondary_text(Glib::ustring::compose (inclBatchProcessed ? M("FILEBROWSER_DELETEDIALOG_SELECTEDINCLPROC") : M("FILEBROWSER_DELETEDIALOG_SELECTED"), tbe.size()), true);
|
||||
} else {
|
||||
msd.set_secondary_text(Glib::ustring::compose (M("FILEBROWSER_DELETEDIALOG_ALL"), tbe.size()), true);
|
||||
}
|
||||
|
||||
if (msd.run() == Gtk::RESPONSE_YES) {
|
||||
for (unsigned int i = 0; i < tbe.size(); i++) {
|
||||
const auto fname = tbe[i]->filename;
|
||||
@@ -1832,7 +1837,7 @@ void FileCatalog::emptyTrash ()
|
||||
toDel.push_back (static_cast<FileBrowserEntry*>(t[i]));
|
||||
}
|
||||
|
||||
deleteRequested (toDel, false);
|
||||
deleteRequested (toDel, false, false);
|
||||
trashChanged();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user