mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 08:51:04 +02:00
CMovieBrowser::onDeleteFile: Use epg info instead of filename for display
Origin commit data
------------------
Branch: ni/coolstream
Commit: 3b78f47756
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2015-09-29 (Tue, 29 Sep 2015)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
committed by
vanhofen
parent
8d79a9931e
commit
d9600f1c20
@@ -2148,16 +2148,46 @@ void CMovieBrowser::onDeleteFile(MI_MOVIE_INFO *movieinfo, bool skipAsk)
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
size_t msgMax = 50;
|
||||
std::string msg = g_Locale->getText(LOCALE_FILEBROWSER_DODELETE1);
|
||||
msg += "\n ";
|
||||
if (movieinfo->file.Name.length() > 40)
|
||||
{
|
||||
msg += movieinfo->file.Name.substr(0,40);
|
||||
if (movieinfo->epgTitle != "") {
|
||||
if ((movieinfo->epgTitle.length() + movieinfo->epgInfo1.length()) <= msgMax) {
|
||||
msg += movieinfo->epgTitle;
|
||||
if (movieinfo->epgInfo1 != "") {
|
||||
msg += " (";
|
||||
msg += movieinfo->epgInfo1;
|
||||
msg += ")";
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (movieinfo->epgTitle.length() > msgMax) {
|
||||
msg += movieinfo->epgTitle.substr(0, msgMax);
|
||||
msg += "...";
|
||||
}
|
||||
else {
|
||||
msg += movieinfo->epgTitle;
|
||||
if (movieinfo->epgInfo1 != "") {
|
||||
msg += "\n (";
|
||||
if (movieinfo->epgInfo1.length() > msgMax) {
|
||||
msg = movieinfo->epgInfo1.substr(0, msgMax);
|
||||
msg += "...";
|
||||
}
|
||||
else
|
||||
msg += movieinfo->epgInfo1;
|
||||
msg += ")";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (movieinfo->file.Name.length() > msgMax) {
|
||||
msg += movieinfo->file.Name.substr(0, msgMax);
|
||||
msg += "...";
|
||||
}
|
||||
else
|
||||
msg += movieinfo->file.Name;
|
||||
|
||||
}
|
||||
msg += "\n";
|
||||
msg += g_Locale->getText(LOCALE_FILEBROWSER_DODELETE2);
|
||||
if ((skipAsk) || (ShowMsg(LOCALE_FILEBROWSER_DELETE, msg, CMessageBox::mbrYes, CMessageBox::mbYes|CMessageBox::mbNo)==CMessageBox::mbrYes))
|
||||
|
Reference in New Issue
Block a user