moviebrowser: allow to delete all marked movies w/o any question

Origin commit data
------------------
Branch: ni/coolstream
Commit: ebd3cf6369
Author: vanhofen <vanhofen@gmx.de>
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
This commit is contained in:
vanhofen
2015-09-29 08:00:00 +02:00
parent d9600f1c20
commit eeb4f456ff
5 changed files with 10 additions and 0 deletions

View File

@@ -1571,6 +1571,7 @@ moviebrowser.copying Kopiere Sprungmarken, bitte warten ...
moviebrowser.cut Schneide Sprungmarken aus dem Film? moviebrowser.cut Schneide Sprungmarken aus dem Film?
moviebrowser.cut_failed Fehler beim Schneiden. Sind Sprungmarken und genug freier Speicher vorhanden? moviebrowser.cut_failed Fehler beim Schneiden. Sind Sprungmarken und genug freier Speicher vorhanden?
moviebrowser.cutting Schneide Film, bitte warten ... 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_info Lösche Dateien, bitte warten...
moviebrowser.delete_screenshot Lösche Screenshot? moviebrowser.delete_screenshot Lösche Screenshot?
moviebrowser.dir Pfad moviebrowser.dir Pfad

View File

@@ -1574,6 +1574,7 @@ moviebrowser.copying Coping, please wait ...
moviebrowser.cut Cut jumps from movie? moviebrowser.cut Cut jumps from movie?
moviebrowser.cut_failed Cut failed, are there jump bookmarks and enough free space? moviebrowser.cut_failed Cut failed, are there jump bookmarks and enough free space?
moviebrowser.cutting Cutting movie, please wait ... 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_info Delete files, please wait...
moviebrowser.delete_screenshot Delete screenshot? moviebrowser.delete_screenshot Delete screenshot?
moviebrowser.dir Path moviebrowser.dir Path

View File

@@ -1832,6 +1832,7 @@ bool CMovieBrowser::onButtonPressMainFrame(neutrino_msg_t msg)
MI_MOVIE_LIST dellist; MI_MOVIE_LIST dellist;
MI_MOVIE_LIST::iterator dellist_it; MI_MOVIE_LIST::iterator dellist_it;
dellist.clear(); dellist.clear();
unsigned int dellist_cnt = 0;
bool skipAsk = false; bool skipAsk = false;
for (filelist_it = filelist.begin(); filelist_it != filelist.end(); ++filelist_it) for (filelist_it = filelist.begin(); filelist_it != filelist.end(); ++filelist_it)
{ {
@@ -1862,10 +1863,15 @@ bool CMovieBrowser::onButtonPressMainFrame(neutrino_msg_t msg)
} }
} }
if (onDelete) if (onDelete)
{
dellist.push_back(*movieinfo); dellist.push_back(*movieinfo);
dellist_cnt++;
}
} }
} }
if (!dellist.empty()) { 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) for (dellist_it = dellist.begin(); dellist_it != dellist.end(); ++dellist_it)
onDeleteFile((MI_MOVIE_INFO *)&(*dellist_it), skipAsk); onDeleteFile((MI_MOVIE_INFO *)&(*dellist_it), skipAsk);
dellist.clear(); dellist.clear();

View File

@@ -1601,6 +1601,7 @@ typedef enum
LOCALE_MOVIEBROWSER_CUT, LOCALE_MOVIEBROWSER_CUT,
LOCALE_MOVIEBROWSER_CUT_FAILED, LOCALE_MOVIEBROWSER_CUT_FAILED,
LOCALE_MOVIEBROWSER_CUTTING, LOCALE_MOVIEBROWSER_CUTTING,
LOCALE_MOVIEBROWSER_DELETE_ALL,
LOCALE_MOVIEBROWSER_DELETE_INFO, LOCALE_MOVIEBROWSER_DELETE_INFO,
LOCALE_MOVIEBROWSER_DELETE_SCREENSHOT, LOCALE_MOVIEBROWSER_DELETE_SCREENSHOT,
LOCALE_MOVIEBROWSER_DIR, LOCALE_MOVIEBROWSER_DIR,

View File

@@ -1601,6 +1601,7 @@ const char * locale_real_names[] =
"moviebrowser.cut", "moviebrowser.cut",
"moviebrowser.cut_failed", "moviebrowser.cut_failed",
"moviebrowser.cutting", "moviebrowser.cutting",
"moviebrowser.delete_all",
"moviebrowser.delete_info", "moviebrowser.delete_info",
"moviebrowser.delete_screenshot", "moviebrowser.delete_screenshot",
"moviebrowser.dir", "moviebrowser.dir",