summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkamel5 <vdr.kamel5 (at) gmx (dot) net>2019-11-09 15:37:11 +0100
committerkamel5 <vdr.kamel5 (at) gmx (dot) net>2022-06-18 17:03:15 +0200
commitb804b63353f9593041787dea2aeed3b546ef8939 (patch)
tree21e58212b25c671289cc5f1663162684973ab343
parenta7e0aacdf182a33b380165ea5563340e0158a03e (diff)
downloadvdr-plugin-tvguide-b804b63353f9593041787dea2aeed3b546ef8939.tar.gz
vdr-plugin-tvguide-b804b63353f9593041787dea2aeed3b546ef8939.tar.bz2
Refactor cRecMenuRecordingSearchResults
-rw-r--r--po/ca_ES.po8
-rw-r--r--po/de_DE.po8
-rw-r--r--po/it_IT.po8
-rw-r--r--po/ru_RU.po8
-rw-r--r--po/sk_SK.po8
-rw-r--r--recmenus.c22
6 files changed, 30 insertions, 32 deletions
diff --git a/po/ca_ES.po b/po/ca_ES.po
index 168df9b..51aff2c 100644
--- a/po/ca_ES.po
+++ b/po/ca_ES.po
@@ -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"
diff --git a/po/de_DE.po b/po/de_DE.po
index 30e5821..8739a10 100644
--- a/po/de_DE.po
+++ b/po/de_DE.po
@@ -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"
diff --git a/po/it_IT.po b/po/it_IT.po
index f4a561a..41e6701 100644
--- a/po/it_IT.po
+++ b/po/it_IT.po
@@ -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"
diff --git a/po/ru_RU.po b/po/ru_RU.po
index 53a3c7e..d435402 100644
--- a/po/ru_RU.po
+++ b/po/ru_RU.po
@@ -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 "для"
diff --git a/po/sk_SK.po b/po/sk_SK.po
index 548f102..99f4ba9 100644
--- a/po/sk_SK.po
+++ b/po/sk_SK.po
@@ -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 "Njden"
-msgid "recording"
-msgstr "nahrvka"
-
msgid "recordings"
msgstr "nahrvky"
+msgid "recording"
+msgstr "nahrvka"
+
msgid "for"
msgstr "pre"
diff --git a/recmenus.c b/recmenus.c
index 5cdeeae..d13b96c 100644
--- a/recmenus.c
+++ b/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();