Refactor cRecMenuSearchTimerTemplates

This commit is contained in:
kamel5 2019-11-09 13:51:21 +01:00
parent 30fc49af0c
commit a4cc2a4fa8
6 changed files with 45 additions and 43 deletions

View File

@ -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 14:39+0200\n" "POT-Creation-Date: 2022-04-29 14:48+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"
@ -285,14 +285,14 @@ msgstr "Final"
msgid "Configure Search Timer based on:" msgid "Configure Search Timer based on:"
msgstr "Configura cerca de temporitzadors segons:" msgstr "Configura cerca de temporitzadors segons:"
msgid "Search Expression:"
msgstr "Cerca expressió:"
msgid "Continue" msgid "Continue"
msgstr "Continua" msgstr "Continua"
msgid "Configure Search Timer for Search String" msgid "Search Expression:"
msgstr "Configura cerca de temporitzadors amb text" msgstr "Cerca expressió:"
msgid "Configure Search Timer for Search String:"
msgstr "Configura cerca de temporitzadors amb text:"
msgid "Manually configure Options" msgid "Manually configure Options"
msgstr "Opcions de configuració manual" msgstr "Opcions de configuració manual"

View File

@ -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 14:39+0200\n" "POT-Creation-Date: 2022-04-29 14:48+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"
@ -282,14 +282,14 @@ msgstr "Stop"
msgid "Configure Search Timer based on:" msgid "Configure Search Timer based on:"
msgstr "Suchtimer konfigurieren basierend auf:" msgstr "Suchtimer konfigurieren basierend auf:"
msgid "Search Expression:"
msgstr "Suchausdruck:"
msgid "Continue" msgid "Continue"
msgstr "Weiter" msgstr "Weiter"
msgid "Configure Search Timer for Search String" msgid "Search Expression:"
msgstr "Suchtimer konfigurieren für Suchbegriff" msgstr "Suchausdruck:"
msgid "Configure Search Timer for Search String:"
msgstr "Suchtimer konfigurieren für Suchbegriff:"
msgid "Manually configure Options" msgid "Manually configure Options"
msgstr "Optionen manuell konfigurieren" msgstr "Optionen manuell konfigurieren"

View File

@ -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 14:39+0200\n" "POT-Creation-Date: 2022-04-29 14:48+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"
@ -282,14 +282,14 @@ msgstr "Ferma"
msgid "Configure Search Timer based on:" msgid "Configure Search Timer based on:"
msgstr "Configura il Search Timer in serie basato su:" msgstr "Configura il Search Timer in serie basato su:"
msgid "Search Expression:"
msgstr "Cerca espressione:"
msgid "Continue" msgid "Continue"
msgstr "Continua" msgstr "Continua"
msgid "Configure Search Timer for Search String" msgid "Search Expression:"
msgstr "Configura il Search Timer basato su Search String" msgstr "Cerca espressione:"
msgid "Configure Search Timer for Search String:"
msgstr "Configura il Search Timer basato su Search String:"
msgid "Manually configure Options" msgid "Manually configure Options"
msgstr "Configura manualmente le Opzioni" msgstr "Configura manualmente le Opzioni"

View File

@ -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 14:39+0200\n" "POT-Creation-Date: 2022-04-29 14:48+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"
@ -282,14 +282,14 @@ msgstr "Стоп"
msgid "Configure Search Timer based on:" msgid "Configure Search Timer based on:"
msgstr "Настроить поисковый таймер:" msgstr "Настроить поисковый таймер:"
msgid "Search Expression:"
msgstr "Искать выражение:"
msgid "Continue" msgid "Continue"
msgstr "Продолжить" msgstr "Продолжить"
msgid "Configure Search Timer for Search String" msgid "Search Expression:"
msgstr "Настройка таймера поиска по ключевым словам" msgstr "Искать выражение:"
msgid "Configure Search Timer for Search String:"
msgstr "Настройка таймера поиска по ключевым словам:"
msgid "Manually configure Options" msgid "Manually configure Options"
msgstr "Ручная настройка параметров" msgstr "Ручная настройка параметров"

View File

@ -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 14:39+0200\n" "POT-Creation-Date: 2022-04-29 14:48+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"
@ -282,14 +282,14 @@ msgstr "Stop"
msgid "Configure Search Timer based on:" msgid "Configure Search Timer based on:"
msgstr "Vyhµadávanie plánu nastavi» na základe:" msgstr "Vyhµadávanie plánu nastavi» na základe:"
msgid "Search Expression:"
msgstr "Hµadaný výraz:"
msgid "Continue" msgid "Continue"
msgstr "Ïal¹ie" msgstr "Ïal¹ie"
msgid "Configure Search Timer for Search String" msgid "Search Expression:"
msgstr "Konfigurácia vyhµadávania plánu pre hµadané kµúèové slovo " msgstr "Hµadaný výraz:"
msgid "Configure Search Timer for Search String:"
msgstr "Konfigurácia vyhµadávania plánu pre hµadané kµúèové slovo:"
msgid "Manually configure Options" msgid "Manually configure Options"
msgstr "Ruène konfigurova» mo¾nosti" msgstr "Ruène konfigurova» mo¾nosti"

View File

@ -617,24 +617,25 @@ cRecMenuSearchTimer::cRecMenuSearchTimer(const cEvent *event) { // OK
} }
// --- cRecMenuSearchTimerTemplates --------------------------------------------------------- // --- cRecMenuSearchTimerTemplates ---------------------------------------------------------
cRecMenuSearchTimerTemplates::cRecMenuSearchTimerTemplates(cTVGuideSearchTimer searchTimer, std::vector<TVGuideEPGSearchTemplate> templates) { cRecMenuSearchTimerTemplates::cRecMenuSearchTimerTemplates(cTVGuideSearchTimer searchTimer, std::vector<TVGuideEPGSearchTemplate> templates) { // OK
SetWidthPercent(70);
this->searchTimer = searchTimer; this->searchTimer = searchTimer;
this->templates = templates; this->templates = templates;
SetWidthPercent(70);
cString message = tr("Configure Search Timer for Search String");
cString infoText = cString::sprintf("%s:\n%s", *message, searchTimer.GetSearchString().c_str());
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*infoText, true);
infoItem->CalculateHeight(width - 2 * border);
SetHeader(infoItem);
AddMenuItemInitial(new cRecMenuItemButton(tr("Manually configure Options"), rmsSearchTimerEdit, true)); const cString line1 = tr("Configure Search Timer for Search String:");
const cString line2 = cString::sprintf("\"%s\"", searchTimer.GetSearchString().c_str());
AddHeader(new cRecMenuItemInfo(*line1, 2, *line2, "", "", width - 2 * border, true));
AddFooter(new cRecMenuItemButton(tr("Manually configure Options"), rmsSearchTimerEdit, true));
numTemplates = templates.size(); numTemplates = templates.size();
for (int i=0; i<numTemplates; i++) { for (int i = 0; i < numTemplates; i++) {
cString buttonText = cString::sprintf("%s \"%s\"", tr("Use Template"), templates[i].name.c_str()); const cString buttonText = cString::sprintf("%s \"%s\"", tr("Use Template"), templates[i].name.c_str());
if (!AddMenuItemInitial(new cRecMenuItemButton(*buttonText, rmsSearchTimerCreateWithTemplate, false))) if (!AddMenuItemInitial(new cRecMenuItemButton(*buttonText, rmsSearchTimerCreateWithTemplate, false)))
break; break;
} }
CalculateHeight(); CalculateHeight();
CreatePixmap(); CreatePixmap();
Arrange(); Arrange();
@ -662,6 +663,7 @@ TVGuideEPGSearchTemplate cRecMenuSearchTimerTemplates::GetTemplate(void) {
templ = templates[tmplActive]; templ = templates[tmplActive];
return templ; return templ;
} }
// --- cRecMenuSearchTimers --------------------------------------------------------- // --- cRecMenuSearchTimers ---------------------------------------------------------
cRecMenuSearchTimers::cRecMenuSearchTimers(std::vector<cTVGuideSearchTimer> searchTimers) { cRecMenuSearchTimers::cRecMenuSearchTimers(std::vector<cTVGuideSearchTimer> searchTimers) {
this->searchTimers = searchTimers; this->searchTimers = searchTimers;