From eeb4f456ff91998d82d0678eae850f587700cf6d Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 29 Sep 2015 08:00:00 +0200 Subject: [PATCH] moviebrowser: allow to delete all marked movies w/o any question Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/ebd3cf6369a682f94254d2fe3a478cd0e2f2b3df Author: vanhofen Date: 2015-09-29 (Tue, 29 Sep 2015) Origin message was: ------------------ - moviebrowser: allow to delete all marked movies w/o any question ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- data/locale/deutsch.locale | 1 + data/locale/english.locale | 1 + src/gui/moviebrowser.cpp | 6 ++++++ src/system/locals.h | 1 + src/system/locals_intern.h | 1 + 5 files changed, 10 insertions(+) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index b295b6b91..98d532202 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -1571,6 +1571,7 @@ moviebrowser.copying Kopiere Sprungmarken, bitte warten ... moviebrowser.cut Schneide Sprungmarken aus dem Film? moviebrowser.cut_failed Fehler beim Schneiden. Sind Sprungmarken und genug freier Speicher vorhanden? moviebrowser.cutting Schneide Film, bitte warten ... +moviebrowser.delete_all Alle markierten Filme ohne weitere Nachfrage löschen? moviebrowser.delete_info Lösche Dateien, bitte warten... moviebrowser.delete_screenshot Lösche Screenshot? moviebrowser.dir Pfad diff --git a/data/locale/english.locale b/data/locale/english.locale index 8e0c8c946..a9f65cb8e 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -1574,6 +1574,7 @@ moviebrowser.copying Coping, please wait ... moviebrowser.cut Cut jumps from movie? moviebrowser.cut_failed Cut failed, are there jump bookmarks and enough free space? moviebrowser.cutting Cutting movie, please wait ... +moviebrowser.delete_all Delete all selected movies without any questions? moviebrowser.delete_info Delete files, please wait... moviebrowser.delete_screenshot Delete screenshot? moviebrowser.dir Path diff --git a/src/gui/moviebrowser.cpp b/src/gui/moviebrowser.cpp index 995d12ab0..d26841203 100644 --- a/src/gui/moviebrowser.cpp +++ b/src/gui/moviebrowser.cpp @@ -1832,6 +1832,7 @@ bool CMovieBrowser::onButtonPressMainFrame(neutrino_msg_t msg) MI_MOVIE_LIST dellist; MI_MOVIE_LIST::iterator dellist_it; dellist.clear(); + unsigned int dellist_cnt = 0; bool skipAsk = false; for (filelist_it = filelist.begin(); filelist_it != filelist.end(); ++filelist_it) { @@ -1862,10 +1863,15 @@ bool CMovieBrowser::onButtonPressMainFrame(neutrino_msg_t msg) } } if (onDelete) + { dellist.push_back(*movieinfo); + dellist_cnt++; + } } } if (!dellist.empty()) { + if (dellist_cnt > 1) + skipAsk = (ShowMsg(LOCALE_FILEBROWSER_DELETE, LOCALE_MOVIEBROWSER_DELETE_ALL, CMessageBox::mbrNo, CMessageBox:: mbYes | CMessageBox::mbNo) == CMessageBox::mbrYes); for (dellist_it = dellist.begin(); dellist_it != dellist.end(); ++dellist_it) onDeleteFile((MI_MOVIE_INFO *)&(*dellist_it), skipAsk); dellist.clear(); diff --git a/src/system/locals.h b/src/system/locals.h index 95cd72516..82c124fae 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -1601,6 +1601,7 @@ typedef enum LOCALE_MOVIEBROWSER_CUT, LOCALE_MOVIEBROWSER_CUT_FAILED, LOCALE_MOVIEBROWSER_CUTTING, + LOCALE_MOVIEBROWSER_DELETE_ALL, LOCALE_MOVIEBROWSER_DELETE_INFO, LOCALE_MOVIEBROWSER_DELETE_SCREENSHOT, LOCALE_MOVIEBROWSER_DIR, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index bfd9e78b2..b3012a405 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -1601,6 +1601,7 @@ const char * locale_real_names[] = "moviebrowser.cut", "moviebrowser.cut_failed", "moviebrowser.cutting", + "moviebrowser.delete_all", "moviebrowser.delete_info", "moviebrowser.delete_screenshot", "moviebrowser.dir",