mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
Refactor cRecMenuRecordingSearchResults
This commit is contained in:
parent
a7e0aacdf1
commit
b804b63353
@ -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"
|
||||
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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 "для"
|
||||
|
||||
|
@ -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"
|
||||
|
||||
|
22
recmenus.c
22
recmenus.c
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user