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 ""
|
msgstr ""
|
||||||
"Project-Id-Version: vdr-tvguide 0.0.1\n"
|
"Project-Id-Version: vdr-tvguide 0.0.1\n"
|
||||||
"Report-Msgid-Bugs-To: <see README>\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"
|
"PO-Revision-Date: 2013-09-21 17:49+0200\n"
|
||||||
"Last-Translator: My friend <Sampep> Thanks David <Gabychan> <gbonich@gmail.com>\n"
|
"Last-Translator: My friend <Sampep> Thanks David <Gabychan> <gbonich@gmail.com>\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
@ -561,12 +561,12 @@ msgstr ""
|
|||||||
msgid "Found"
|
msgid "Found"
|
||||||
msgstr "Trobada"
|
msgstr "Trobada"
|
||||||
|
|
||||||
msgid "recording"
|
|
||||||
msgstr "gravació"
|
|
||||||
|
|
||||||
msgid "recordings"
|
msgid "recordings"
|
||||||
msgstr "gravacions"
|
msgstr "gravacions"
|
||||||
|
|
||||||
|
msgid "recording"
|
||||||
|
msgstr "gravació"
|
||||||
|
|
||||||
msgid "for"
|
msgid "for"
|
||||||
msgstr "per"
|
msgstr "per"
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: vdr-tvguide 0.0.1\n"
|
"Project-Id-Version: vdr-tvguide 0.0.1\n"
|
||||||
"Report-Msgid-Bugs-To: <see README>\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"
|
"PO-Revision-Date: 2012-08-25 17:49+0200\n"
|
||||||
"Last-Translator: Horst\n"
|
"Last-Translator: Horst\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
@ -558,12 +558,12 @@ msgstr "Suchausdruck muss mindestens drei Zeichen haben"
|
|||||||
msgid "Found"
|
msgid "Found"
|
||||||
msgstr " "
|
msgstr " "
|
||||||
|
|
||||||
msgid "recording"
|
|
||||||
msgstr "Aufnahme gefunden"
|
|
||||||
|
|
||||||
msgid "recordings"
|
msgid "recordings"
|
||||||
msgstr "Aufnahmen gefunden"
|
msgstr "Aufnahmen gefunden"
|
||||||
|
|
||||||
|
msgid "recording"
|
||||||
|
msgstr "Aufnahme gefunden"
|
||||||
|
|
||||||
msgid "for"
|
msgid "for"
|
||||||
msgstr "für"
|
msgstr "für"
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: vdr-tvguide 0.0.1\n"
|
"Project-Id-Version: vdr-tvguide 0.0.1\n"
|
||||||
"Report-Msgid-Bugs-To: <see README>\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"
|
"PO-Revision-Date: 2012-08-25 17:49+0200\n"
|
||||||
"Last-Translator: fiveten_59\n"
|
"Last-Translator: fiveten_59\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
@ -558,12 +558,12 @@ msgstr "Search String deve avere almeno tre lettere"
|
|||||||
msgid "Found"
|
msgid "Found"
|
||||||
msgstr "Trovato"
|
msgstr "Trovato"
|
||||||
|
|
||||||
msgid "recording"
|
|
||||||
msgstr "registrazione"
|
|
||||||
|
|
||||||
msgid "recordings"
|
msgid "recordings"
|
||||||
msgstr "registrazioni"
|
msgstr "registrazioni"
|
||||||
|
|
||||||
|
msgid "recording"
|
||||||
|
msgstr "registrazione"
|
||||||
|
|
||||||
msgid "for"
|
msgid "for"
|
||||||
msgstr "per"
|
msgstr "per"
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: vdr-tvguide 1.0.0\n"
|
"Project-Id-Version: vdr-tvguide 1.0.0\n"
|
||||||
"Report-Msgid-Bugs-To: <see README>\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"
|
"PO-Revision-Date: 2013-09-25 17:49+0400\n"
|
||||||
"Last-Translator: AmiD, ilya\n"
|
"Last-Translator: AmiD, ilya\n"
|
||||||
"Language-Team: Russia-Cherepovets(wm.amid@gmail.com)\n"
|
"Language-Team: Russia-Cherepovets(wm.amid@gmail.com)\n"
|
||||||
@ -558,12 +558,12 @@ msgstr ""
|
|||||||
msgid "Found"
|
msgid "Found"
|
||||||
msgstr "Найдено"
|
msgstr "Найдено"
|
||||||
|
|
||||||
msgid "recording"
|
|
||||||
msgstr "запись"
|
|
||||||
|
|
||||||
msgid "recordings"
|
msgid "recordings"
|
||||||
msgstr "записей"
|
msgstr "записей"
|
||||||
|
|
||||||
|
msgid "recording"
|
||||||
|
msgstr "запись"
|
||||||
|
|
||||||
msgid "for"
|
msgid "for"
|
||||||
msgstr "для"
|
msgstr "для"
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: vdr-tvguide 1.1.0\n"
|
"Project-Id-Version: vdr-tvguide 1.1.0\n"
|
||||||
"Report-Msgid-Bugs-To: <see README>\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"
|
"PO-Revision-Date: 2013-09-15 00:12+0100\n"
|
||||||
"Last-Translator: Milan Hrala <hrala.milan@gmail.com>\n"
|
"Last-Translator: Milan Hrala <hrala.milan@gmail.com>\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
@ -558,12 +558,12 @@ msgstr ""
|
|||||||
msgid "Found"
|
msgid "Found"
|
||||||
msgstr "Nájdené"
|
msgstr "Nájdené"
|
||||||
|
|
||||||
msgid "recording"
|
|
||||||
msgstr "nahrávka"
|
|
||||||
|
|
||||||
msgid "recordings"
|
msgid "recordings"
|
||||||
msgstr "nahrávky"
|
msgstr "nahrávky"
|
||||||
|
|
||||||
|
msgid "recording"
|
||||||
|
msgstr "nahrávka"
|
||||||
|
|
||||||
msgid "for"
|
msgid "for"
|
||||||
msgstr "pre"
|
msgstr "pre"
|
||||||
|
|
||||||
|
22
recmenus.c
22
recmenus.c
@ -1444,28 +1444,26 @@ cRecMenuRecordingSearch::cRecMenuRecordingSearch(std::string search) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// --- cRecMenuRecordingSearchResults ---------------------------------------------------------
|
// --- 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->searchString = searchString;
|
||||||
this->searchResults = searchResults;
|
this->searchResults = searchResults;
|
||||||
SetWidthPercent(80);
|
|
||||||
cString message1 = tr("Found");
|
|
||||||
cString message2 = tr("recording");
|
|
||||||
cString message3 = tr("recordings");
|
|
||||||
cString message4 = tr("for");
|
|
||||||
this->numResults = numResults;
|
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);
|
const cString line1 = cString::sprintf("%s %d %s %s:", tr("Found"), numResults, (numResults > 1) ? tr("recordings") : tr("recording"), tr("for"));
|
||||||
SetFooter(buttons);
|
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)) {
|
if (searchResults && (numResults > 0)) {
|
||||||
for (int i = 0; i < numResults; i++) {
|
for (int i = 0; i < numResults; i++) {
|
||||||
if (!AddMenuItemInitial(new cRecMenuItemRecording(searchResults[i], (i == 0) ? true : false)))
|
if (!AddMenuItemInitial(new cRecMenuItemRecording(searchResults[i], (i == 0) ? true : false)))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CalculateHeight();
|
CalculateHeight();
|
||||||
CreatePixmap();
|
CreatePixmap();
|
||||||
Arrange();
|
Arrange();
|
||||||
|
Loading…
Reference in New Issue
Block a user