From 30fc49af0c802fc8aab2b18a444ef541b3c7c15c Mon Sep 17 00:00:00 2001 From: kamel5 Date: Sat, 9 Nov 2019 13:39:14 +0100 Subject: [PATCH] Refactor cRecMenuSearchTimer --- po/ca_ES.po | 4 ++-- po/de_DE.po | 4 ++-- po/it_IT.po | 4 ++-- po/ru_RU.po | 4 ++-- po/sk_SK.po | 4 ++-- recmenus.c | 16 +++++++++------- 6 files changed, 19 insertions(+), 17 deletions(-) diff --git a/po/ca_ES.po b/po/ca_ES.po index 62a5f2d..8ab309f 100644 --- a/po/ca_ES.po +++ b/po/ca_ES.po @@ -282,8 +282,8 @@ msgstr "Inici" msgid "Stop" msgstr "Final" -msgid "Configure Search Timer based on" -msgstr "Configura cerca de temporitzadors segons" +msgid "Configure Search Timer based on:" +msgstr "Configura cerca de temporitzadors segons:" msgid "Search Expression:" msgstr "Cerca expressió:" diff --git a/po/de_DE.po b/po/de_DE.po index 1ac9ff3..7f08a8e 100644 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -279,8 +279,8 @@ msgstr "Start" msgid "Stop" msgstr "Stop" -msgid "Configure Search Timer based on" -msgstr "Suchtimer konfigurieren basierend auf" +msgid "Configure Search Timer based on:" +msgstr "Suchtimer konfigurieren basierend auf:" msgid "Search Expression:" msgstr "Suchausdruck:" diff --git a/po/it_IT.po b/po/it_IT.po index 6c8589e..34f9fd7 100644 --- a/po/it_IT.po +++ b/po/it_IT.po @@ -279,8 +279,8 @@ msgstr "Avvio" msgid "Stop" msgstr "Ferma" -msgid "Configure Search Timer based on" -msgstr "Configura il Search Timer in serie basato su" +msgid "Configure Search Timer based on:" +msgstr "Configura il Search Timer in serie basato su:" msgid "Search Expression:" msgstr "Cerca espressione:" diff --git a/po/ru_RU.po b/po/ru_RU.po index 19c267d..3c095ed 100644 --- a/po/ru_RU.po +++ b/po/ru_RU.po @@ -279,8 +279,8 @@ msgstr "Старт" msgid "Stop" msgstr "Стоп" -msgid "Configure Search Timer based on" -msgstr "Настроить поисковый таймер" +msgid "Configure Search Timer based on:" +msgstr "Настроить поисковый таймер:" msgid "Search Expression:" msgstr "Искать выражение:" diff --git a/po/sk_SK.po b/po/sk_SK.po index 7510967..9c3103e 100644 --- a/po/sk_SK.po +++ b/po/sk_SK.po @@ -279,8 +279,8 @@ msgstr " msgid "Stop" msgstr "Stop" -msgid "Configure Search Timer based on" -msgstr "Vyhadvanie plnu nastavi na zklade" +msgid "Configure Search Timer based on:" +msgstr "Vyhadvanie plnu nastavi na zklade:" msgid "Search Expression:" msgstr "Hadan vraz:" diff --git a/recmenus.c b/recmenus.c index 846fbd4..7772168 100644 --- a/recmenus.c +++ b/recmenus.c @@ -599,16 +599,18 @@ cRecMenuConfirmSeriesTimer::cRecMenuConfirmSeriesTimer(cTimer *seriesTimer) { // ******************************************************************************************/ // --- cRecMenuSearchTimer --------------------------------------------------------- -cRecMenuSearchTimer::cRecMenuSearchTimer(const cEvent *event) { +cRecMenuSearchTimer::cRecMenuSearchTimer(const cEvent *event) { // OK SetWidthPercent(70); - cString message = tr("Configure Search Timer based on"); - cString infoText = cString::sprintf("%s:\n\"%s\"", *message, event->Title()); - cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*infoText, true); - infoItem->CalculateHeight(width - 2 * border); - SetHeader(infoItem); + + const cString line1 = tr("Configure Search Timer based on:"); + const cString line2 = cString::sprintf("\"%s\"", event->Title()); + + AddHeader(new cRecMenuItemInfo(*line1, 2, *line2, "", "", width - 2 * border, true)); + AddFooter(new cRecMenuItemButtonYesNo(tr("Continue"), tr("Cancel"), rmsSearchTimerOptions, rmsClose, true)); + strncpy(searchString, event->Title(), TEXTINPUTLENGTH); AddMenuItemInitial(new cRecMenuItemText(tr("Search Expression:"), TEXTINPUTLENGTH, false, searchString)); - AddMenuItemInitial(new cRecMenuItemButtonYesNo(tr("Continue"), tr("Cancel"), rmsSearchTimerOptions, rmsClose, true)); + CalculateHeight(); CreatePixmap(); Arrange();