Refactor cRecMenuRecordingSearchResults

This commit is contained in:
kamel5 2019-11-09 15:37:11 +01:00
parent a7e0aacdf1
commit b804b63353
6 changed files with 30 additions and 32 deletions

View File

@ -3,7 +3,7 @@ msgid ""
msgstr ""
"Project-Id-Version: vdr-tvguide 0.0.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2022-04-29 15:40+0200\n"
"POT-Creation-Date: 2022-04-29 16:05+0200\n"
"PO-Revision-Date: 2013-09-21 17:49+0200\n"
"Last-Translator: My friend <Sampep> Thanks David <Gabychan> <gbonich@gmail.com>\n"
"Language-Team: \n"
@ -561,12 +561,12 @@ msgstr ""
msgid "Found"
msgstr "Trobada"
msgid "recording"
msgstr "gravació"
msgid "recordings"
msgstr "gravacions"
msgid "recording"
msgstr "gravació"
msgid "for"
msgstr "per"

View File

@ -3,7 +3,7 @@ msgid ""
msgstr ""
"Project-Id-Version: vdr-tvguide 0.0.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2022-04-29 15:40+0200\n"
"POT-Creation-Date: 2022-04-29 16:05+0200\n"
"PO-Revision-Date: 2012-08-25 17:49+0200\n"
"Last-Translator: Horst\n"
"Language-Team: \n"
@ -558,12 +558,12 @@ msgstr "Suchausdruck muss mindestens drei Zeichen haben"
msgid "Found"
msgstr " "
msgid "recording"
msgstr "Aufnahme gefunden"
msgid "recordings"
msgstr "Aufnahmen gefunden"
msgid "recording"
msgstr "Aufnahme gefunden"
msgid "for"
msgstr "für"

View File

@ -3,7 +3,7 @@ msgid ""
msgstr ""
"Project-Id-Version: vdr-tvguide 0.0.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2022-04-29 15:40+0200\n"
"POT-Creation-Date: 2022-04-29 16:05+0200\n"
"PO-Revision-Date: 2012-08-25 17:49+0200\n"
"Last-Translator: fiveten_59\n"
"Language-Team: \n"
@ -558,12 +558,12 @@ msgstr "Search String deve avere almeno tre lettere"
msgid "Found"
msgstr "Trovato"
msgid "recording"
msgstr "registrazione"
msgid "recordings"
msgstr "registrazioni"
msgid "recording"
msgstr "registrazione"
msgid "for"
msgstr "per"

View File

@ -3,7 +3,7 @@ msgid ""
msgstr ""
"Project-Id-Version: vdr-tvguide 1.0.0\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2022-04-29 15:40+0200\n"
"POT-Creation-Date: 2022-04-29 16:05+0200\n"
"PO-Revision-Date: 2013-09-25 17:49+0400\n"
"Last-Translator: AmiD, ilya\n"
"Language-Team: Russia-Cherepovets(wm.amid@gmail.com)\n"
@ -558,12 +558,12 @@ msgstr ""
msgid "Found"
msgstr "Найдено"
msgid "recording"
msgstr "запись"
msgid "recordings"
msgstr "записей"
msgid "recording"
msgstr "запись"
msgid "for"
msgstr "для"

View File

@ -3,7 +3,7 @@ msgid ""
msgstr ""
"Project-Id-Version: vdr-tvguide 1.1.0\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2022-04-29 15:40+0200\n"
"POT-Creation-Date: 2022-04-29 16:05+0200\n"
"PO-Revision-Date: 2013-09-15 00:12+0100\n"
"Last-Translator: Milan Hrala <hrala.milan@gmail.com>\n"
"Language-Team: \n"
@ -558,12 +558,12 @@ msgstr ""
msgid "Found"
msgstr "Nájdené"
msgid "recording"
msgstr "nahrávka"
msgid "recordings"
msgstr "nahrávky"
msgid "recording"
msgstr "nahrávka"
msgid "for"
msgstr "pre"

View File

@ -1444,28 +1444,26 @@ cRecMenuRecordingSearch::cRecMenuRecordingSearch(std::string search) {
}
// --- cRecMenuRecordingSearchResults ---------------------------------------------------------
cRecMenuRecordingSearchResults::cRecMenuRecordingSearchResults(std::string searchString, const cRecording **searchResults, int numResults) {
cRecMenuRecordingSearchResults::cRecMenuRecordingSearchResults(std::string searchString, const cRecording **searchResults, int numResults) { // OK
SetWidthPercent(80);
this->searchString = searchString;
this->searchResults = searchResults;
SetWidthPercent(80);
cString message1 = tr("Found");
cString message2 = tr("recording");
cString message3 = tr("recordings");
cString message4 = tr("for");
this->numResults = numResults;
cString infoText = cString::sprintf("%s %d %s %s:\n\"%s\"", *message1, numResults, (numResults>1)?(*message3):(*message2), *message4, searchString.c_str());
cRecMenuItem *infoItem = new cRecMenuItemInfo(*infoText, true);
infoItem->CalculateHeight(width - 2 * border);
SetHeader(infoItem);
cRecMenuItem *buttons = new cRecMenuItemButtonYesNo(tr("Adapt Search"), tr("Close"), rmsRecordingSearch, rmsClose, false);
SetFooter(buttons);
const cString line1 = cString::sprintf("%s %d %s %s:", tr("Found"), numResults, (numResults > 1) ? tr("recordings") : tr("recording"), tr("for"));
const cString line2 = cString::sprintf("\"%s\"", searchString.c_str());
AddHeader(new cRecMenuItemInfo(*line1, 2, *line2, "", "", width - 2 * border, true));
AddFooter(new cRecMenuItemButtonYesNo(tr("Adapt Search"), tr("Close"), rmsRecordingSearch, rmsClose, (numResults) ? false : true));
if (searchResults && (numResults > 0)) {
for (int i = 0; i < numResults; i++) {
if (!AddMenuItemInitial(new cRecMenuItemRecording(searchResults[i], (i == 0) ? true : false)))
break;
}
}
CalculateHeight();
CreatePixmap();
Arrange();