mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
Refactor cRecMenuSearch
This commit is contained in:
parent
a3dc78f70a
commit
5cc50e465d
@ -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:32+0200\n"
|
||||
"POT-Creation-Date: 2022-04-29 15:40+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"
|
||||
@ -525,6 +525,9 @@ msgstr "No s'ha creat el canvi de temporitzador"
|
||||
msgid "Switch Timer deleted"
|
||||
msgstr "Canvi de temporitzador esborrat"
|
||||
|
||||
msgid "Perform Search"
|
||||
msgstr "Realitza la cerca"
|
||||
|
||||
msgid "Search Mode"
|
||||
msgstr "Mode de cerca"
|
||||
|
||||
@ -543,9 +546,6 @@ msgstr "Cerca a la descripció"
|
||||
msgid "Show Search Options"
|
||||
msgstr "Mostra opcions de cerca"
|
||||
|
||||
msgid "Perform Search"
|
||||
msgstr "Realitza la cerca"
|
||||
|
||||
msgid "search results for"
|
||||
msgstr "resultats de cerca 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:32+0200\n"
|
||||
"POT-Creation-Date: 2022-04-29 15:40+0200\n"
|
||||
"PO-Revision-Date: 2012-08-25 17:49+0200\n"
|
||||
"Last-Translator: Horst\n"
|
||||
"Language-Team: \n"
|
||||
@ -522,6 +522,9 @@ msgstr "Umschalttimer NICHT erfolgreich angelegt"
|
||||
msgid "Switch Timer deleted"
|
||||
msgstr "Umschalttimer gelöscht"
|
||||
|
||||
msgid "Perform Search"
|
||||
msgstr "Suche ausführen"
|
||||
|
||||
msgid "Search Mode"
|
||||
msgstr "Suchmodus"
|
||||
|
||||
@ -540,9 +543,6 @@ msgstr "In Beschreibung suchen"
|
||||
msgid "Show Search Options"
|
||||
msgstr "Suchoptionen anzeigen"
|
||||
|
||||
msgid "Perform Search"
|
||||
msgstr "Suche ausführen"
|
||||
|
||||
msgid "search results for"
|
||||
msgstr "Suchergebnisse 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:32+0200\n"
|
||||
"POT-Creation-Date: 2022-04-29 15:40+0200\n"
|
||||
"PO-Revision-Date: 2012-08-25 17:49+0200\n"
|
||||
"Last-Translator: fiveten_59\n"
|
||||
"Language-Team: \n"
|
||||
@ -522,6 +522,9 @@ msgstr "Switch Timer NON creato"
|
||||
msgid "Switch Timer deleted"
|
||||
msgstr "Switch Timer eliminato"
|
||||
|
||||
msgid "Perform Search"
|
||||
msgstr "Fai una ricerca"
|
||||
|
||||
msgid "Search Mode"
|
||||
msgstr "Modalità di ricerca"
|
||||
|
||||
@ -540,9 +543,6 @@ msgstr "Cerca nella descrizione"
|
||||
msgid "Show Search Options"
|
||||
msgstr "Mostra opzioni di ricerca"
|
||||
|
||||
msgid "Perform Search"
|
||||
msgstr "Fai una ricerca"
|
||||
|
||||
msgid "search results for"
|
||||
msgstr "cerca risultati 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:32+0200\n"
|
||||
"POT-Creation-Date: 2022-04-29 15:40+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"
|
||||
@ -522,6 +522,9 @@ msgstr "Таймер переключения НЕ был создан!"
|
||||
msgid "Switch Timer deleted"
|
||||
msgstr "Таймер переключения удален"
|
||||
|
||||
msgid "Perform Search"
|
||||
msgstr "Найти"
|
||||
|
||||
msgid "Search Mode"
|
||||
msgstr "Режим поиска"
|
||||
|
||||
@ -540,9 +543,6 @@ msgstr "Искать в описаниях"
|
||||
msgid "Show Search Options"
|
||||
msgstr "Показать параметры поиска"
|
||||
|
||||
msgid "Perform Search"
|
||||
msgstr "Найти"
|
||||
|
||||
msgid "search results 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:32+0200\n"
|
||||
"POT-Creation-Date: 2022-04-29 15:40+0200\n"
|
||||
"PO-Revision-Date: 2013-09-15 00:12+0100\n"
|
||||
"Last-Translator: Milan Hrala <hrala.milan@gmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
@ -522,6 +522,9 @@ msgstr "Pl
|
||||
msgid "Switch Timer deleted"
|
||||
msgstr "Plán prepnutia vymazaný"
|
||||
|
||||
msgid "Perform Search"
|
||||
msgstr "Vykona» vyhµadávanie"
|
||||
|
||||
msgid "Search Mode"
|
||||
msgstr "Re¾im vyhµadávania"
|
||||
|
||||
@ -540,9 +543,6 @@ msgstr "H
|
||||
msgid "Show Search Options"
|
||||
msgstr "Zobrazi» mo¾nosti vyhµadávania"
|
||||
|
||||
msgid "Perform Search"
|
||||
msgstr "Vykona» vyhµadávanie"
|
||||
|
||||
msgid "search results for"
|
||||
msgstr "vyhµadané výsledky pre"
|
||||
|
||||
|
31
recmenus.c
31
recmenus.c
@ -1152,33 +1152,36 @@ cRecMenuSwitchTimerDelete::cRecMenuSwitchTimerDelete(void) { // OK
|
||||
|
||||
|
||||
// --- cRecMenuSearch ---------------------------------------------------------
|
||||
cRecMenuSearch::cRecMenuSearch(std::string searchString, bool withOptions) {
|
||||
cRecMenuSearch::cRecMenuSearch(std::string searchString, bool withOptions) { // OK
|
||||
SetWidthPercent(60);
|
||||
|
||||
strncpy(this->searchString, searchString.c_str(), TEXTINPUTLENGTH);
|
||||
mode = 0;
|
||||
channelNr = 0;
|
||||
useTitle = true;
|
||||
useSubTitle = true;
|
||||
useDescription = false;
|
||||
SetWidthPercent(60);
|
||||
cString infoText = tr("Search");
|
||||
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*infoText, true);
|
||||
infoItem->CalculateHeight(width - 2 * border);
|
||||
SetHeader(infoItem);
|
||||
|
||||
const cString line1 = tr("Search");
|
||||
|
||||
AddHeader(new cRecMenuItemInfo(*line1, 1, "", "", "", width - 2 * border, true));
|
||||
AddFooter(new cRecMenuItemButtonYesNo(tr("Perform Search"), tr("Cancel"), rmsSearchPerform, rmsClose, true));
|
||||
|
||||
AddMenuItem(new cRecMenuItemText(tr("Search Expression:"), TEXTINPUTLENGTH, false, this->searchString));
|
||||
|
||||
if (withOptions) {
|
||||
std::vector<std::string> searchModes;
|
||||
cTVGuideSearchTimer searchTimer;
|
||||
searchTimer.GetSearchModes(&searchModes);
|
||||
AddMenuItemInitial(new cRecMenuItemSelect(tr("Search Mode"), searchModes, false, &mode));
|
||||
AddMenuItemInitial(new cRecMenuItemChannelChooser(tr("Channel to Search"), false, &channelNr));
|
||||
AddMenuItemInitial(new cRecMenuItemBool(tr("Search in title"), false, &useTitle));
|
||||
AddMenuItemInitial(new cRecMenuItemBool(tr("Search in Subtitle"), false, &useSubTitle));
|
||||
AddMenuItemInitial(new cRecMenuItemBool(tr("Search in Description"), false, &useDescription));
|
||||
AddMenuItem(new cRecMenuItemSelect(tr("Search Mode"), searchModes, false, &mode));
|
||||
AddMenuItem(new cRecMenuItemChannelChooser(tr("Channel to Search"), false, &channelNr));
|
||||
AddMenuItem(new cRecMenuItemBool(tr("Search in title"), false, &useTitle));
|
||||
AddMenuItem(new cRecMenuItemBool(tr("Search in Subtitle"), false, &useSubTitle));
|
||||
AddMenuItem(new cRecMenuItemBool(tr("Search in Description"), false, &useDescription));
|
||||
} else {
|
||||
AddMenuItemInitial(new cRecMenuItemButton(tr("Show Search Options"), rmsSearchWithOptions, false));
|
||||
AddMenuItem(new cRecMenuItemButton(tr("Show Search Options"), rmsSearchWithOptions, false));
|
||||
}
|
||||
cRecMenuItemButtonYesNo *button = new cRecMenuItemButtonYesNo(tr("Perform Search"), tr("Cancel"), rmsSearchPerform, rmsClose, true);
|
||||
SetFooter(button);
|
||||
|
||||
CalculateHeight();
|
||||
CreatePixmap();
|
||||
Arrange();
|
||||
|
Loading…
Reference in New Issue
Block a user