mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
various improvements in search&rec menus
This commit is contained in:
parent
3121910dc1
commit
d0651a4a50
@ -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: 2014-01-11 16:02+0100\n"
|
||||
"POT-Creation-Date: 2014-01-12 16:23+0100\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"
|
||||
@ -456,6 +456,9 @@ msgstr "resultat de cerca per"
|
||||
msgid "Adapt Search"
|
||||
msgstr "Cerca adaptada"
|
||||
|
||||
msgid "Search String has to have at least three letters"
|
||||
msgstr ""
|
||||
|
||||
msgid "Found"
|
||||
msgstr "Trobada"
|
||||
|
||||
@ -720,7 +723,7 @@ msgstr "Mida de la Font - Menú Cerca & Enregistra"
|
||||
msgid "Search & Recording Menu Small Font Size"
|
||||
msgstr "Mida de la Font petita - Menú Cerca & Enregistra"
|
||||
|
||||
msgid "Search & Recording Main Menu Font Size"
|
||||
msgid "Search & Recording Menu Header Font Size"
|
||||
msgstr ""
|
||||
|
||||
msgid "Create Log Messages for image loading"
|
||||
|
11
po/de_DE.po
11
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: 2014-01-11 16:02+0100\n"
|
||||
"POT-Creation-Date: 2014-01-12 16:23+0100\n"
|
||||
"PO-Revision-Date: 2012-08-25 17:49+0200\n"
|
||||
"Last-Translator: Horst\n"
|
||||
"Language-Team: \n"
|
||||
@ -97,7 +97,7 @@ msgid "Edit Timer"
|
||||
msgstr "Timer bearbeiten"
|
||||
|
||||
msgid "Timer Timeline"
|
||||
msgstr "Timer anzeigen"
|
||||
msgstr "Timer Tagesübersicht"
|
||||
|
||||
msgid "Create Search Timer"
|
||||
msgstr "Suchtimer anlegen"
|
||||
@ -453,6 +453,9 @@ msgstr "Suchergebnis für"
|
||||
msgid "Adapt Search"
|
||||
msgstr "Suche anpassen"
|
||||
|
||||
msgid "Search String has to have at least three letters"
|
||||
msgstr "Suchausdruck muss mindestens drei Zeichen haben"
|
||||
|
||||
msgid "Found"
|
||||
msgstr " "
|
||||
|
||||
@ -717,8 +720,8 @@ msgstr "Suchen & Aufnehmen Menu Schriftgröße"
|
||||
msgid "Search & Recording Menu Small Font Size"
|
||||
msgstr "Suchen & Aufnehmen Menu kleine Schriftgröße"
|
||||
|
||||
msgid "Search & Recording Main Menu Font Size"
|
||||
msgstr "Suchen & Aufnehmen Hauptmenü Schriftgröße"
|
||||
msgid "Search & Recording Menu Header Font Size"
|
||||
msgstr "Suchen & Aufnehmen Menu Header Schriftgröße"
|
||||
|
||||
msgid "Create Log Messages for image loading"
|
||||
msgstr "Log Nachrichten für das Laden der Bilder erzeugen"
|
||||
|
@ -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: 2014-01-11 16:02+0100\n"
|
||||
"POT-Creation-Date: 2014-01-12 16:23+0100\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"
|
||||
@ -453,6 +453,9 @@ msgstr "Найден по запросу"
|
||||
msgid "Adapt Search"
|
||||
msgstr "Изменить"
|
||||
|
||||
msgid "Search String has to have at least three letters"
|
||||
msgstr ""
|
||||
|
||||
msgid "Found"
|
||||
msgstr "Найдено"
|
||||
|
||||
@ -717,7 +720,7 @@ msgstr "Размер шрифта меню Поиск & Запись"
|
||||
msgid "Search & Recording Menu Small Font Size"
|
||||
msgstr "Размер маленького шрифта меню Поиск & Запись"
|
||||
|
||||
msgid "Search & Recording Main Menu Font Size"
|
||||
msgid "Search & Recording Menu Header Font Size"
|
||||
msgstr ""
|
||||
|
||||
msgid "Create Log Messages for image loading"
|
||||
|
@ -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: 2014-01-11 16:02+0100\n"
|
||||
"POT-Creation-Date: 2014-01-12 16:23+0100\n"
|
||||
"PO-Revision-Date: 2013-09-15 00:12+0100\n"
|
||||
"Last-Translator: Milan Hrala <hrala.milan@gmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
@ -453,6 +453,9 @@ msgstr "vyh
|
||||
msgid "Adapt Search"
|
||||
msgstr "Prispôsobi» vyhµadávanie"
|
||||
|
||||
msgid "Search String has to have at least three letters"
|
||||
msgstr ""
|
||||
|
||||
msgid "Found"
|
||||
msgstr "Nájdené"
|
||||
|
||||
@ -717,7 +720,7 @@ msgstr "H
|
||||
msgid "Search & Recording Menu Small Font Size"
|
||||
msgstr "Hµada» & Nahra» menu malé písmo"
|
||||
|
||||
msgid "Search & Recording Main Menu Font Size"
|
||||
msgid "Search & Recording Menu Header Font Size"
|
||||
msgstr ""
|
||||
|
||||
msgid "Create Log Messages for image loading"
|
||||
|
38
recmenu.c
38
recmenu.c
@ -24,7 +24,7 @@ cRecMenu::cRecMenu(void) {
|
||||
cRecMenu::~cRecMenu(void) {
|
||||
if (header)
|
||||
delete header;
|
||||
ClearMenuItems();
|
||||
ClearMenuItems(true);
|
||||
if (footer)
|
||||
delete footer;
|
||||
if (pixmapScrollBar)
|
||||
@ -102,11 +102,12 @@ void cRecMenu::SetFooter(cRecMenuItem *footer) {
|
||||
height += footerHeight;
|
||||
}
|
||||
|
||||
void cRecMenu::ClearMenuItems(void) {
|
||||
if (deleteMenuItems) {
|
||||
for (std::list<cRecMenuItem*>::iterator it = menuItems.begin(); it != menuItems.end(); it++) {
|
||||
void cRecMenu::ClearMenuItems(bool destructor) {
|
||||
for (std::list<cRecMenuItem*>::iterator it = menuItems.begin(); it != menuItems.end(); it++) {
|
||||
if (deleteMenuItems)
|
||||
delete *it;
|
||||
}
|
||||
else if (!destructor)
|
||||
(*it)->Hide();
|
||||
}
|
||||
menuItems.clear();
|
||||
};
|
||||
@ -142,6 +143,7 @@ void cRecMenu::InitMenu(bool complete) {
|
||||
|
||||
|
||||
void cRecMenu::AddMenuItem(cRecMenuItem *item, bool inFront) {
|
||||
item->Show();
|
||||
if (!inFront)
|
||||
menuItems.push_back(item);
|
||||
else
|
||||
@ -206,7 +208,7 @@ bool cRecMenu::ActivatePrev(void) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void cRecMenu::ScrollUp(void) {
|
||||
bool cRecMenu::ScrollUp(void) {
|
||||
if (footer && footer->isActive()) {
|
||||
if (menuItems.size() > 0)
|
||||
Activate(footer, menuItems.back());
|
||||
@ -238,8 +240,11 @@ void cRecMenu::ScrollUp(void) {
|
||||
Arrange(deleteMenuItems);
|
||||
Display(deleteMenuItems);
|
||||
ActivatePrev();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool cRecMenu::ActivateNext(void) {
|
||||
@ -262,7 +267,7 @@ bool cRecMenu::ActivateNext(void) {
|
||||
if (next) {
|
||||
Activate(activeItem , next);
|
||||
return true;
|
||||
} else if (!scrollable && footer && footer->isSelectable()) {
|
||||
} else if (!scrollable && footer && footer->isSelectable() && !footer->isActive()) {
|
||||
Activate(activeItem , footer);
|
||||
return true;
|
||||
}
|
||||
@ -270,7 +275,7 @@ bool cRecMenu::ActivateNext(void) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void cRecMenu::ScrollDown(void) {
|
||||
bool cRecMenu::ScrollDown(void) {
|
||||
//get next x items
|
||||
int numNewItems = numItems / 2;
|
||||
int numAdded = 0;
|
||||
@ -299,12 +304,15 @@ void cRecMenu::ScrollDown(void) {
|
||||
Display(deleteMenuItems);
|
||||
ActivateNext();
|
||||
} else {
|
||||
//last item reached, activate footer
|
||||
if (footer) {
|
||||
//last item reached, activate footer if not already active
|
||||
if ((footer) && !(footer->isActive())) {
|
||||
cRecMenuItem *activeItem = GetActiveMenuItem();
|
||||
Activate(activeItem , footer);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void cRecMenu::JumpBegin(void) {
|
||||
@ -532,13 +540,15 @@ eRecMenuState cRecMenu::ProcessKey(eKeys Key) {
|
||||
switch (Key & ~k_Repeat) {
|
||||
case kUp:
|
||||
if (!ActivatePrev())
|
||||
ScrollUp();
|
||||
state = rmsConsumed;
|
||||
if (!ScrollUp())
|
||||
JumpEnd();
|
||||
state = rmsConsumed;
|
||||
break;
|
||||
case kDown:
|
||||
if (!ActivateNext())
|
||||
ScrollDown();
|
||||
state = rmsConsumed;
|
||||
if (!ScrollDown())
|
||||
JumpBegin();
|
||||
state = rmsConsumed;
|
||||
break;
|
||||
case kLeft:
|
||||
JumpBegin();
|
||||
|
@ -14,8 +14,8 @@ private:
|
||||
void Activate(cRecMenuItem *itemOld, cRecMenuItem *item);
|
||||
bool ActivateNext(void);
|
||||
bool ActivatePrev(void);
|
||||
void ScrollUp(void);
|
||||
void ScrollDown(void);
|
||||
bool ScrollUp(void);
|
||||
bool ScrollDown(void);
|
||||
void JumpBegin(void);
|
||||
void JumpEnd(void);
|
||||
protected:
|
||||
@ -37,7 +37,7 @@ protected:
|
||||
void CreatePixmap(void);
|
||||
void SetHeader(cRecMenuItem *header);
|
||||
void SetFooter(cRecMenuItem *footer);
|
||||
void ClearMenuItems(void);
|
||||
void ClearMenuItems(bool destructor = false);
|
||||
void InitMenu(bool complete);
|
||||
bool AddMenuItemInitial(cRecMenuItem *item);
|
||||
void AddMenuItem(cRecMenuItem *item, bool inFront = false);
|
||||
|
233
recmenuitem.c
233
recmenuitem.c
@ -109,13 +109,13 @@ void cRecMenuItemButton::Draw(void) {
|
||||
}
|
||||
|
||||
void cRecMenuItemButton::Hide(void) {
|
||||
pixmap->SetLayer(-1);
|
||||
pixmapText->SetLayer(-1);
|
||||
if (pixmap) pixmap->SetLayer(-1);
|
||||
if (pixmapText) pixmapText->SetLayer(-1);
|
||||
}
|
||||
|
||||
void cRecMenuItemButton::Show(void) {
|
||||
pixmap->SetLayer(4);
|
||||
pixmapText->SetLayer(5);
|
||||
if (pixmap) pixmap->SetLayer(4);
|
||||
if (pixmapText) pixmapText->SetLayer(5);
|
||||
}
|
||||
|
||||
eRecMenuState cRecMenuItemButton::ProcessKey(eKeys Key) {
|
||||
@ -167,13 +167,13 @@ void cRecMenuItemButtonYesNo::SetPixmaps(void) {
|
||||
}
|
||||
|
||||
void cRecMenuItemButtonYesNo::Hide(void) {
|
||||
pixmap->SetLayer(-1);
|
||||
pixmapNo->SetLayer(-1);
|
||||
if (pixmap) pixmap->SetLayer(-1);
|
||||
if (pixmapNo) pixmapNo->SetLayer(-1);
|
||||
}
|
||||
|
||||
void cRecMenuItemButtonYesNo::Show(void) {
|
||||
pixmap->SetLayer(4);
|
||||
pixmapNo->SetLayer(4);
|
||||
if (pixmap) pixmap->SetLayer(4);
|
||||
if (pixmapNo) pixmapNo->SetLayer(4);
|
||||
}
|
||||
|
||||
void cRecMenuItemButtonYesNo::setBackground() {
|
||||
@ -262,10 +262,11 @@ eRecMenuState cRecMenuItemButtonYesNo::ProcessKey(eKeys Key) {
|
||||
}
|
||||
|
||||
// --- cRecMenuItemInfo -------------------------------------------------------
|
||||
cRecMenuItemInfo::cRecMenuItemInfo(const char *text) {
|
||||
cRecMenuItemInfo::cRecMenuItemInfo(const char *text, bool largeFont) {
|
||||
selectable = false;
|
||||
active = false;
|
||||
this->text = text;
|
||||
fontInfo = (largeFont) ? fontLarge : font;
|
||||
border = 10;
|
||||
}
|
||||
|
||||
@ -273,8 +274,8 @@ cRecMenuItemInfo::~cRecMenuItemInfo(void) {
|
||||
}
|
||||
|
||||
void cRecMenuItemInfo::CalculateHeight(int textWidth) {
|
||||
wrapper.Set(*text, font, textWidth);
|
||||
height = font->Height() * wrapper.Lines() + 2*border;
|
||||
wrapper.Set(*text, fontInfo, textWidth);
|
||||
height = fontInfo->Height() * wrapper.Lines() + 2*border;
|
||||
}
|
||||
|
||||
void cRecMenuItemInfo::setBackground(void) {
|
||||
@ -284,12 +285,12 @@ void cRecMenuItemInfo::setBackground(void) {
|
||||
|
||||
void cRecMenuItemInfo::Draw(void) {
|
||||
int lines = wrapper.Lines();
|
||||
int lineHeight = font->Height();
|
||||
int lineHeight = fontInfo->Height();
|
||||
int x = 0;
|
||||
int y = border;
|
||||
for (int i = 0; i < lines; i++) {
|
||||
x = (width - font->Width(wrapper.GetLine(i))) / 2;
|
||||
pixmap->DrawText(cPoint(x,y), wrapper.GetLine(i), theme.Color(clrFont), clrTransparent, font);
|
||||
x = (width - fontInfo->Width(wrapper.GetLine(i))) / 2;
|
||||
pixmap->DrawText(cPoint(x,y), wrapper.GetLine(i), theme.Color(clrFont), clrTransparent, fontInfo);
|
||||
y += lineHeight;
|
||||
}
|
||||
}
|
||||
@ -331,13 +332,13 @@ void cRecMenuItemInt::SetPixmaps(void) {
|
||||
}
|
||||
|
||||
void cRecMenuItemInt::Hide(void) {
|
||||
pixmap->SetLayer(-1);
|
||||
pixmapVal->SetLayer(-1);
|
||||
if (pixmap) pixmap->SetLayer(-1);
|
||||
if (pixmapVal) pixmapVal->SetLayer(-1);
|
||||
}
|
||||
|
||||
void cRecMenuItemInt::Show(void) {
|
||||
pixmap->SetLayer(4);
|
||||
pixmapVal->SetLayer(5);
|
||||
if (pixmap) pixmap->SetLayer(4);
|
||||
if (pixmapVal) pixmapVal->SetLayer(5);
|
||||
}
|
||||
|
||||
void cRecMenuItemInt::setBackground() {
|
||||
@ -437,13 +438,13 @@ void cRecMenuItemBool::SetPixmaps(void) {
|
||||
}
|
||||
|
||||
void cRecMenuItemBool::Hide(void) {
|
||||
pixmap->SetLayer(-1);
|
||||
pixmapVal->SetLayer(-1);
|
||||
if (pixmap) pixmap->SetLayer(-1);
|
||||
if (pixmapVal) pixmapVal->SetLayer(-1);
|
||||
}
|
||||
|
||||
void cRecMenuItemBool::Show(void) {
|
||||
pixmap->SetLayer(4);
|
||||
pixmapVal->SetLayer(5);
|
||||
if (pixmap) pixmap->SetLayer(4);
|
||||
if (pixmapVal) pixmapVal->SetLayer(5);
|
||||
}
|
||||
|
||||
void cRecMenuItemBool::Draw(void) {
|
||||
@ -524,13 +525,13 @@ void cRecMenuItemSelect::SetPixmaps(void) {
|
||||
}
|
||||
|
||||
void cRecMenuItemSelect::Hide(void) {
|
||||
pixmap->SetLayer(-1);
|
||||
pixmapVal->SetLayer(-1);
|
||||
if (pixmap) pixmap->SetLayer(-1);
|
||||
if (pixmapVal) pixmapVal->SetLayer(-1);
|
||||
}
|
||||
|
||||
void cRecMenuItemSelect::Show(void) {
|
||||
pixmap->SetLayer(4);
|
||||
pixmapVal->SetLayer(5);
|
||||
if (pixmap) pixmap->SetLayer(4);
|
||||
if (pixmapVal) pixmapVal->SetLayer(5);
|
||||
}
|
||||
|
||||
void cRecMenuItemSelect::Draw(void) {
|
||||
@ -660,16 +661,16 @@ void cRecMenuItemText::SetPixmaps(void) {
|
||||
}
|
||||
|
||||
void cRecMenuItemText::Hide(void) {
|
||||
pixmap->SetLayer(-1);
|
||||
pixmapVal->SetLayer(-1);
|
||||
pixmapKeyboard->SetLayer(-1);
|
||||
pixmapKeyboardHighlight->SetLayer(-1);
|
||||
pixmapKeyboardIcons->SetLayer(-1);
|
||||
if (pixmap) pixmap->SetLayer(-1);
|
||||
if (pixmapVal) pixmapVal->SetLayer(-1);
|
||||
if (pixmapKeyboard) pixmapKeyboard->SetLayer(-1);
|
||||
if (pixmapKeyboardHighlight) pixmapKeyboardHighlight->SetLayer(-1);
|
||||
if (pixmapKeyboardIcons) pixmapKeyboardIcons->SetLayer(-1);
|
||||
}
|
||||
|
||||
void cRecMenuItemText::Show(void) {
|
||||
pixmap->SetLayer(4);
|
||||
pixmapVal->SetLayer(5);
|
||||
if (pixmap) pixmap->SetLayer(4);
|
||||
if (pixmapVal) pixmapVal->SetLayer(5);
|
||||
}
|
||||
|
||||
void cRecMenuItemText::setBackground() {
|
||||
@ -1196,13 +1197,13 @@ void cRecMenuItemTime::SetPixmaps(void) {
|
||||
}
|
||||
|
||||
void cRecMenuItemTime::Hide(void) {
|
||||
pixmap->SetLayer(-1);
|
||||
pixmapVal->SetLayer(-1);
|
||||
if (pixmap) pixmap->SetLayer(-1);
|
||||
if (pixmapVal) pixmapVal->SetLayer(-1);
|
||||
}
|
||||
|
||||
void cRecMenuItemTime::Show(void) {
|
||||
pixmap->SetLayer(4);
|
||||
pixmapVal->SetLayer(5);
|
||||
if (pixmap) pixmap->SetLayer(4);
|
||||
if (pixmapVal) pixmapVal->SetLayer(5);
|
||||
}
|
||||
|
||||
void cRecMenuItemTime::Draw(void) {
|
||||
@ -1336,13 +1337,13 @@ void cRecMenuItemDay::SetPixmaps(void) {
|
||||
}
|
||||
|
||||
void cRecMenuItemDay::Hide(void) {
|
||||
pixmap->SetLayer(-1);
|
||||
pixmapVal->SetLayer(-1);
|
||||
if (pixmap) pixmap->SetLayer(-1);
|
||||
if (pixmapVal) pixmapVal->SetLayer(-1);
|
||||
}
|
||||
|
||||
void cRecMenuItemDay::Show(void) {
|
||||
pixmap->SetLayer(4);
|
||||
pixmapVal->SetLayer(5);
|
||||
if (pixmap) pixmap->SetLayer(4);
|
||||
if (pixmapVal) pixmapVal->SetLayer(5);
|
||||
}
|
||||
|
||||
void cRecMenuItemDay::Draw(void) {
|
||||
@ -1432,15 +1433,15 @@ void cRecMenuItemTimer::SetPixmaps(void) {
|
||||
}
|
||||
|
||||
void cRecMenuItemTimer::Hide(void) {
|
||||
pixmap->SetLayer(-1);
|
||||
pixmapStatus->SetLayer(-1);
|
||||
pixmapIcons->SetLayer(-1);
|
||||
if (pixmap) pixmap->SetLayer(-1);
|
||||
if (pixmapStatus) pixmapStatus->SetLayer(-1);
|
||||
if (pixmapIcons) pixmapIcons->SetLayer(-1);
|
||||
}
|
||||
|
||||
void cRecMenuItemTimer::Show(void) {
|
||||
pixmap->SetLayer(4);
|
||||
pixmapStatus->SetLayer(5);
|
||||
pixmapIcons->SetLayer(6);
|
||||
if (pixmap) pixmap->SetLayer(4);
|
||||
if (pixmapStatus) pixmapStatus->SetLayer(5);
|
||||
if (pixmapIcons) pixmapIcons->SetLayer(6);
|
||||
}
|
||||
|
||||
void cRecMenuItemTimer::Draw(void) {
|
||||
@ -1605,13 +1606,13 @@ void cRecMenuItemTimerConflictHeader::SetPixmaps(void) {
|
||||
}
|
||||
|
||||
void cRecMenuItemTimerConflictHeader::Hide(void) {
|
||||
pixmap->SetLayer(-1);
|
||||
pixmapStatus->SetLayer(-1);
|
||||
if (pixmap) pixmap->SetLayer(-1);
|
||||
if (pixmapStatus) pixmapStatus->SetLayer(-1);
|
||||
}
|
||||
|
||||
void cRecMenuItemTimerConflictHeader::Show(void) {
|
||||
pixmap->SetLayer(4);
|
||||
pixmapStatus->SetLayer(5);
|
||||
if (pixmap) pixmap->SetLayer(4);
|
||||
if (pixmapStatus) pixmapStatus->SetLayer(5);
|
||||
}
|
||||
|
||||
void cRecMenuItemTimerConflictHeader::setBackground(void) {
|
||||
@ -1764,15 +1765,15 @@ int cRecMenuItemEvent::DrawIcons(void) {
|
||||
}
|
||||
|
||||
void cRecMenuItemEvent::Hide(void) {
|
||||
pixmap->SetLayer(-1);
|
||||
pixmapText->SetLayer(-1);
|
||||
pixmapIcons->SetLayer(-1);
|
||||
if (pixmap) pixmap->SetLayer(-1);
|
||||
if (pixmapText) pixmapText->SetLayer(-1);
|
||||
if (pixmapIcons) pixmapIcons->SetLayer(-1);
|
||||
}
|
||||
|
||||
void cRecMenuItemEvent::Show(void) {
|
||||
pixmap->SetLayer(4);
|
||||
pixmapText->SetLayer(5);
|
||||
pixmapIcons->SetLayer(6);
|
||||
if (pixmap) pixmap->SetLayer(4);
|
||||
if (pixmapText) pixmapText->SetLayer(5);
|
||||
if (pixmapIcons) pixmapIcons->SetLayer(6);
|
||||
}
|
||||
|
||||
eRecMenuState cRecMenuItemEvent::ProcessKey(eKeys Key) {
|
||||
@ -1854,13 +1855,13 @@ void cRecMenuItemChannelChooser::SetPixmaps(void) {
|
||||
}
|
||||
|
||||
void cRecMenuItemChannelChooser::Hide(void) {
|
||||
pixmap->SetLayer(-1);
|
||||
pixmapChannel->SetLayer(-1);
|
||||
if (pixmap) pixmap->SetLayer(-1);
|
||||
if (pixmapChannel) pixmapChannel->SetLayer(-1);
|
||||
}
|
||||
|
||||
void cRecMenuItemChannelChooser::Show(void) {
|
||||
pixmap->SetLayer(4);
|
||||
pixmapChannel->SetLayer(5);
|
||||
if (pixmap) pixmap->SetLayer(4);
|
||||
if (pixmapChannel) pixmapChannel->SetLayer(5);
|
||||
}
|
||||
|
||||
void cRecMenuItemChannelChooser::Draw(void) {
|
||||
@ -2013,15 +2014,15 @@ void cRecMenuItemDayChooser::SetPixmaps(void) {
|
||||
}
|
||||
|
||||
void cRecMenuItemDayChooser::Hide(void) {
|
||||
pixmap->SetLayer(-1);
|
||||
pixmapWeekdays->SetLayer(-1);
|
||||
pixmapWeekdaysSelect->SetLayer(-1);
|
||||
if (pixmap) pixmap->SetLayer(-1);
|
||||
if (pixmapWeekdays) pixmapWeekdays->SetLayer(-1);
|
||||
if (pixmapWeekdaysSelect) pixmapWeekdaysSelect->SetLayer(-1);
|
||||
}
|
||||
|
||||
void cRecMenuItemDayChooser::Show(void) {
|
||||
pixmap->SetLayer(4);
|
||||
pixmapWeekdays->SetLayer(5);
|
||||
pixmapWeekdaysSelect->SetLayer(6);
|
||||
if (pixmap) pixmap->SetLayer(4);
|
||||
if (pixmapWeekdays) pixmapWeekdays->SetLayer(5);
|
||||
if (pixmapWeekdaysSelect) pixmapWeekdaysSelect->SetLayer(6);
|
||||
}
|
||||
|
||||
void cRecMenuItemDayChooser::SetSizes(void) {
|
||||
@ -2166,13 +2167,13 @@ void cRecMenuItemRecording::Draw(void) {
|
||||
}
|
||||
|
||||
void cRecMenuItemRecording::Hide(void) {
|
||||
pixmap->SetLayer(-1);
|
||||
pixmapText->SetLayer(-1);
|
||||
if (pixmap) pixmap->SetLayer(-1);
|
||||
if (pixmapText) pixmapText->SetLayer(-1);
|
||||
}
|
||||
|
||||
void cRecMenuItemRecording::Show(void) {
|
||||
pixmap->SetLayer(4);
|
||||
pixmapText->SetLayer(5);
|
||||
if (pixmap) pixmap->SetLayer(4);
|
||||
if (pixmapText) pixmapText->SetLayer(5);
|
||||
}
|
||||
|
||||
// --- cRecMenuItemTimelineHeader -------------------------------------------------------
|
||||
@ -2234,9 +2235,9 @@ void cRecMenuItemTimelineHeader::Draw(void) {
|
||||
cString headerText = tr("Timers for");
|
||||
cString dateText = DateString(day);
|
||||
cString header = cString::sprintf("%s: %s", *headerText, *dateText);
|
||||
int xText = (width - font->Width(*header)) / 2;
|
||||
int yText = (height/4 - font->Height())/2;
|
||||
pixmap->DrawText(cPoint(xText, yText), *header, colorText, clrTransparent, font);
|
||||
int xText = (width - fontLarge->Width(*header)) / 2;
|
||||
int yText = (height/4 - fontLarge->Height())/2;
|
||||
pixmap->DrawText(cPoint(xText, yText), *header, colorText, clrTransparent, fontLarge);
|
||||
|
||||
DrawCurrentTimer();
|
||||
}
|
||||
@ -2347,19 +2348,17 @@ void cRecMenuItemTimelineHeader::DrawTimerConflicts(void) {
|
||||
}
|
||||
|
||||
void cRecMenuItemTimelineHeader::Hide(void) {
|
||||
pixmap->SetLayer(-1);
|
||||
pixmapTimeline->SetLayer(-1);
|
||||
pixmapTimerInfo->SetLayer(-1);
|
||||
if (pixmapTimerConflicts)
|
||||
pixmapTimerConflicts->SetLayer(-1);
|
||||
if (pixmap) pixmap->SetLayer(-1);
|
||||
if (pixmapTimeline) pixmapTimeline->SetLayer(-1);
|
||||
if (pixmapTimerInfo) pixmapTimerInfo->SetLayer(-1);
|
||||
if (pixmapTimerConflicts) pixmapTimerConflicts->SetLayer(-1);
|
||||
}
|
||||
|
||||
void cRecMenuItemTimelineHeader::Show(void) {
|
||||
pixmap->SetLayer(4);
|
||||
pixmapTimeline->SetLayer(5);
|
||||
pixmapTimerInfo->SetLayer(6);
|
||||
if (pixmapTimerConflicts)
|
||||
pixmapTimerConflicts->SetLayer(6);
|
||||
if (pixmap) pixmap->SetLayer(4);
|
||||
if (pixmapTimeline) pixmapTimeline->SetLayer(5);
|
||||
if (pixmapTimerInfo) pixmapTimerInfo->SetLayer(6);
|
||||
if (pixmapTimerConflicts) pixmapTimerConflicts->SetLayer(6);
|
||||
}
|
||||
|
||||
|
||||
@ -2500,17 +2499,15 @@ void cRecMenuItemTimelineTimer::setInactive(void) {
|
||||
}
|
||||
|
||||
void cRecMenuItemTimelineTimer::Hide(void) {
|
||||
pixmap->SetLayer(-1);
|
||||
pixmapBack->SetLayer(-1);
|
||||
if (pixmapTimerConflicts)
|
||||
pixmapTimerConflicts->SetLayer(-1);
|
||||
if (pixmap) pixmap->SetLayer(-1);
|
||||
if (pixmapBack) pixmapBack->SetLayer(-1);
|
||||
if (pixmapTimerConflicts) pixmapTimerConflicts->SetLayer(-1);
|
||||
}
|
||||
|
||||
void cRecMenuItemTimelineTimer::Show(void) {
|
||||
pixmap->SetLayer(5);
|
||||
pixmapBack->SetLayer(4);
|
||||
if (pixmapTimerConflicts)
|
||||
pixmapTimerConflicts->SetLayer(6);
|
||||
if (pixmap) pixmap->SetLayer(5);
|
||||
if (pixmapBack) pixmapBack->SetLayer(4);
|
||||
if (pixmapTimerConflicts) pixmapTimerConflicts->SetLayer(6);
|
||||
}
|
||||
|
||||
cTimer *cRecMenuItemTimelineTimer::GetTimerValue(void) {
|
||||
@ -2532,10 +2529,12 @@ eRecMenuState cRecMenuItemTimelineTimer::ProcessKey(eKeys Key) {
|
||||
cRecMenuItemSearchTimer::cRecMenuItemSearchTimer(cTVGuideSearchTimer timer,
|
||||
eRecMenuState action1,
|
||||
eRecMenuState action2,
|
||||
eRecMenuState action3,
|
||||
bool active) {
|
||||
this->timer = timer;
|
||||
this->action = action1;
|
||||
this->action2 = action2;
|
||||
this->action3 = action3;
|
||||
pixmapText = NULL;
|
||||
pixmapIcons = NULL;
|
||||
selectable = true;
|
||||
@ -2584,15 +2583,15 @@ void cRecMenuItemSearchTimer::Draw(void) {
|
||||
}
|
||||
|
||||
void cRecMenuItemSearchTimer::Hide(void) {
|
||||
pixmap->SetLayer(-1);
|
||||
pixmapText->SetLayer(-1);
|
||||
pixmapIcons->SetLayer(-1);
|
||||
if (pixmap) pixmap->SetLayer(-1);
|
||||
if (pixmapText) pixmapText->SetLayer(-1);
|
||||
if (pixmapIcons) pixmapIcons->SetLayer(-1);
|
||||
}
|
||||
|
||||
void cRecMenuItemSearchTimer::Show(void) {
|
||||
pixmap->SetLayer(4);
|
||||
pixmapText->SetLayer(5);
|
||||
pixmapIcons->SetLayer(6);
|
||||
if (pixmap) pixmap->SetLayer(4);
|
||||
if (pixmapText) pixmapText->SetLayer(5);
|
||||
if (pixmapIcons) pixmapIcons->SetLayer(6);
|
||||
}
|
||||
|
||||
int cRecMenuItemSearchTimer::DrawIcons(void) {
|
||||
@ -2600,13 +2599,15 @@ int cRecMenuItemSearchTimer::DrawIcons(void) {
|
||||
int iconsX = 10;
|
||||
int iconSize = height / 2;
|
||||
int iconY = (height - iconSize) / 2;
|
||||
std::string iconEdit, iconDelete;
|
||||
std::string iconEdit, iconDelete, iconSearch;
|
||||
if (active) {
|
||||
iconEdit = (iconActive==0)?"edit_active":"edit_inactive";
|
||||
iconDelete = (iconActive==1)?"delete_active":"delete_inactive";
|
||||
iconSearch = (iconActive==2)?"search_active":"search_inactive";
|
||||
} else {
|
||||
iconEdit = "edit_inactive";
|
||||
iconDelete = "delete_inactive";
|
||||
iconSearch = "search_inactive";
|
||||
}
|
||||
cImage *imgEdit = imgCache.GetIcon(iconEdit, iconSize, iconSize);
|
||||
if (imgEdit) {
|
||||
@ -2618,39 +2619,39 @@ int cRecMenuItemSearchTimer::DrawIcons(void) {
|
||||
pixmapIcons->DrawImage(cPoint(iconsX, iconY), *imgDel);
|
||||
iconsX += iconSize + 10;
|
||||
}
|
||||
cImage *imgSearch = imgCache.GetIcon(iconSearch, iconSize, iconSize);
|
||||
if (imgSearch) {
|
||||
pixmapIcons->DrawImage(cPoint(iconsX, iconY), *imgSearch);
|
||||
iconsX += iconSize + 10;
|
||||
}
|
||||
return iconsX;
|
||||
}
|
||||
|
||||
eRecMenuState cRecMenuItemSearchTimer::ProcessKey(eKeys Key) {
|
||||
bool consumed = false;
|
||||
switch (Key & ~k_Repeat) {
|
||||
case kLeft:
|
||||
if (iconActive == 1) {
|
||||
iconActive = 0;
|
||||
consumed = true;
|
||||
}
|
||||
DrawIcons();
|
||||
if (consumed)
|
||||
if (iconActive > 0) {
|
||||
iconActive--;
|
||||
DrawIcons();
|
||||
return rmsConsumed;
|
||||
else
|
||||
return rmsNotConsumed;
|
||||
}
|
||||
return rmsNotConsumed;
|
||||
break;
|
||||
case kRight: {
|
||||
if (iconActive == 0) {
|
||||
iconActive = 1;
|
||||
consumed = true;
|
||||
}
|
||||
DrawIcons();
|
||||
if (consumed)
|
||||
if (iconActive < 2) {
|
||||
iconActive++;
|
||||
DrawIcons();
|
||||
return rmsConsumed;
|
||||
else
|
||||
return rmsNotConsumed;
|
||||
}
|
||||
return rmsNotConsumed;
|
||||
break; }
|
||||
case kOk:
|
||||
if (iconActive == 0)
|
||||
return action;
|
||||
else if (iconActive == 1)
|
||||
return action2;
|
||||
else if (iconActive == 2)
|
||||
return action3;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -106,8 +106,8 @@ public:
|
||||
bool isActive(void) { return active; }
|
||||
virtual void setBackground(void);
|
||||
virtual void Draw(void) {};
|
||||
virtual void Hide(void) { pixmap->SetLayer(-1);};
|
||||
virtual void Show(void) { pixmap->SetLayer(4);};
|
||||
virtual void Hide(void) { if (pixmap) pixmap->SetLayer(-1);};
|
||||
virtual void Show(void) { if (pixmap) pixmap->SetLayer(4);};
|
||||
virtual int GetIntValue(void) { return -1; };
|
||||
virtual time_t GetTimeValue(void) { return 0; };
|
||||
virtual bool GetBoolValue(void) { return false; };
|
||||
@ -168,8 +168,9 @@ private:
|
||||
cString text;
|
||||
cTextWrapper wrapper;
|
||||
int border;
|
||||
const cFont *fontInfo;
|
||||
public:
|
||||
cRecMenuItemInfo(const char *text);
|
||||
cRecMenuItemInfo(const char *text, bool largeFont = false);
|
||||
virtual ~cRecMenuItemInfo(void);
|
||||
void setBackground(void);
|
||||
void CalculateHeight(int textWidth);
|
||||
@ -584,6 +585,7 @@ private:
|
||||
cTVGuideSearchTimer timer;
|
||||
eRecMenuState action1;
|
||||
eRecMenuState action2;
|
||||
eRecMenuState action3;
|
||||
int iconActive;
|
||||
cPixmap *pixmapText;
|
||||
cPixmap *pixmapIcons;
|
||||
@ -592,6 +594,7 @@ public:
|
||||
cRecMenuItemSearchTimer(cTVGuideSearchTimer timer,
|
||||
eRecMenuState action1,
|
||||
eRecMenuState action2,
|
||||
eRecMenuState action3,
|
||||
bool active);
|
||||
virtual ~cRecMenuItemSearchTimer(void);
|
||||
void SetPixmaps(void);
|
||||
|
@ -299,11 +299,13 @@ eOSState cRecMenuManager::StateMachine(eRecMenuState nextState) {
|
||||
activeMenu->Display();
|
||||
break; }
|
||||
case rmsSearchTimerTest: {
|
||||
//caller: cRecMenuSearchTimerEdit, cRecMenuSearchTimerTemplatesCreate
|
||||
//caller: cRecMenuSearchTimerEdit, cRecMenuSearchTimerTemplatesCreate, rmsSearchTimers
|
||||
//show results of currently choosen search timer
|
||||
cTVGuideSearchTimer searchTimer;
|
||||
if (cRecMenuSearchTimerEdit *menu = dynamic_cast<cRecMenuSearchTimerEdit*>(activeMenu)) {
|
||||
searchTimer = menu->GetSearchTimer();
|
||||
} else if (cRecMenuSearchTimers *menu = dynamic_cast<cRecMenuSearchTimers*>(activeMenu)) {
|
||||
searchTimer = menu->GetSearchTimer();
|
||||
} else if (cRecMenuSearchTimerTemplatesCreate *menu = dynamic_cast<cRecMenuSearchTimerTemplatesCreate*>(activeMenu)) {
|
||||
searchTimer = menu->GetSearchTimer();
|
||||
TVGuideEPGSearchTemplate tmpl = menu->GetTemplate();
|
||||
@ -450,12 +452,14 @@ eOSState cRecMenuManager::StateMachine(eRecMenuState nextState) {
|
||||
***********************************************************************************************/
|
||||
case rmsSearch:
|
||||
case rmsSearchWithOptions: {
|
||||
//caller: main menu, cRecMenuSearch
|
||||
//caller: main menu, cRecMenuSearch, cRecMenuSearchResults
|
||||
bool withOptions = false;
|
||||
std::string searchString = event->Title();
|
||||
if (cRecMenuSearch *menu = dynamic_cast<cRecMenuSearch*>(activeMenu)) {
|
||||
withOptions = true;
|
||||
searchString = menu->GetSearchString();
|
||||
} else if (cRecMenuSearchResults *menu = dynamic_cast<cRecMenuSearchResults*>(activeMenu)) {
|
||||
searchString = menu->GetSearchString();
|
||||
}
|
||||
delete activeMenu;
|
||||
activeMenu = new cRecMenuSearch(searchString, withOptions);
|
||||
@ -468,9 +472,10 @@ eOSState cRecMenuManager::StateMachine(eRecMenuState nextState) {
|
||||
epgSearchData = menu->GetEPGSearchStruct();
|
||||
} else break;
|
||||
std::string searchString = epgSearchData.query;
|
||||
if (searchString.size() < 4) {
|
||||
delete activeMenu;
|
||||
activeMenu = new cRecMenuSearch(event->Title(), false);
|
||||
if (searchString.size() < 3) {
|
||||
activeMenuBuffer = activeMenu;
|
||||
activeMenuBuffer->Hide();
|
||||
activeMenu = new cRecMenuSearchNothingFound(searchString, true);
|
||||
} else {
|
||||
int numSearchResults = 0;
|
||||
const cEvent **searchResult = recManager->PerformSearch(epgSearchData, numSearchResults);
|
||||
|
64
recmenus.c
64
recmenus.c
@ -60,7 +60,7 @@ cRecMenuAskFolder::cRecMenuAskFolder(const cEvent *event, eRecMenuState nextActi
|
||||
NextAction = nextAction;
|
||||
cString message = tr("Set Folder for");
|
||||
cString headerText = cString::sprintf("%s\n\"%s\"", *message, event->Title());
|
||||
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*headerText);
|
||||
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*headerText, true);
|
||||
infoItem->CalculateHeight(width - 2 * border);
|
||||
SetHeader(infoItem);
|
||||
|
||||
@ -207,7 +207,7 @@ cRecMenuTimerConflicts::cRecMenuTimerConflicts(cTVGuideTimerConflicts *conflicts
|
||||
} else {
|
||||
text = cString::sprintf("%d %s %s", conflicts->NumConflicts(), tr("Timer Conflicts"), tr("detected"));
|
||||
}
|
||||
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*text);
|
||||
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*text, true);
|
||||
|
||||
for (int i=0; i<numConflicts; i++) {
|
||||
cTVGuideTimerConflict *conflict = conflicts->GetConflict(i);
|
||||
@ -316,7 +316,7 @@ cRecMenuRerunResults::cRecMenuRerunResults(const cEvent *original, const cEvent
|
||||
cString message2 = tr("rerun for");
|
||||
cString message3 = tr("found");
|
||||
cString infoText = cString::sprintf("%d %s:\n\"%s\" %s", numReruns, (numReruns>1)?(*message1):(*message2), original->Title(), *message3);
|
||||
cRecMenuItem *infoItem = new cRecMenuItemInfo(*infoText);
|
||||
cRecMenuItem *infoItem = new cRecMenuItemInfo(*infoText, true);
|
||||
infoItem->CalculateHeight(width - 2 * border);
|
||||
SetHeader(infoItem);
|
||||
|
||||
@ -407,7 +407,7 @@ cRecMenuEditTimer::cRecMenuEditTimer(cTimer *timer, eRecMenuState nextState) {
|
||||
if (timer->Channel())
|
||||
channelName = timer->Channel()->Name();
|
||||
cString infoText = cString::sprintf("%s:\n %s, %s", tr("Edit Timer"), *title, *channelName);
|
||||
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*infoText);
|
||||
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*infoText, true);
|
||||
infoItem->CalculateHeight(width - 2 * border);
|
||||
AddMenuItem(infoItem);
|
||||
|
||||
@ -483,11 +483,11 @@ cRecMenuSeriesTimer::cRecMenuSeriesTimer(cChannel *initialChannel, const cEvent
|
||||
SetWidthPercent(70);
|
||||
cString title = tr("Create Series Timer based on");
|
||||
cString infoText = cString::sprintf("%s:\n%s", *title, event->Title());
|
||||
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*infoText);
|
||||
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*infoText, true);
|
||||
infoItem->CalculateHeight(width - 2 * border);
|
||||
SetHeader(infoItem);
|
||||
|
||||
AddMenuItem(new cRecMenuItemBool(tr("Timer Active"), timerActive, false, true, &timerActive));
|
||||
AddMenuItem(new cRecMenuItemBool(tr("Timer Active"), timerActive, false, false, &timerActive));
|
||||
AddMenuItem(new cRecMenuItemChannelChooser(tr("Channel"), initialChannel, false, &channel));
|
||||
AddMenuItem(new cRecMenuItemTime(tr("Series Timer start time"), start, false, &start));
|
||||
AddMenuItem(new cRecMenuItemTime(tr("Series Timer stop time"), stop, false, &stop));
|
||||
@ -496,7 +496,7 @@ cRecMenuSeriesTimer::cRecMenuSeriesTimer(cChannel *initialChannel, const cEvent
|
||||
AddMenuItem(new cRecMenuItemInt(tr("Priority"), priority, 0, MAXPRIORITY, false, &priority));
|
||||
AddMenuItem(new cRecMenuItemInt(tr("Lifetime"), lifetime, 0, MAXLIFETIME, false, &lifetime));
|
||||
|
||||
AddMenuItem(new cRecMenuItemButtonYesNo(tr("Create Timer"), tr("Cancel"), rmsSeriesTimerCreate, rmsClose, false));
|
||||
AddMenuItem(new cRecMenuItemButtonYesNo(tr("Create Timer"), tr("Cancel"), rmsSeriesTimerCreate, rmsClose, true));
|
||||
|
||||
CalculateHeight();
|
||||
CreatePixmap();
|
||||
@ -567,7 +567,7 @@ cRecMenuSearchTimer::cRecMenuSearchTimer(const cEvent *event) {
|
||||
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);
|
||||
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*infoText, true);
|
||||
infoItem->CalculateHeight(width - 2 * border);
|
||||
SetHeader(infoItem);
|
||||
strncpy(searchString, event->Title(), TEXTINPUTLENGTH);
|
||||
@ -585,7 +585,7 @@ cRecMenuSearchTimerTemplates::cRecMenuSearchTimerTemplates(cTVGuideSearchTimer s
|
||||
SetWidthPercent(70);
|
||||
cString message = tr("Configure Search Timer for Search String");
|
||||
cString infoText = cString::sprintf("%s:\n%s", *message, searchTimer.SearchString().c_str());
|
||||
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*infoText);
|
||||
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*infoText, true);
|
||||
infoItem->CalculateHeight(width - 2 * border);
|
||||
SetHeader(infoItem);
|
||||
|
||||
@ -635,7 +635,7 @@ cRecMenuSearchTimers::cRecMenuSearchTimers(std::vector<cTVGuideSearchTimer> sear
|
||||
} else {
|
||||
headline = tr("No Search Timers Configured");
|
||||
}
|
||||
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*headline);
|
||||
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*headline, true);
|
||||
infoItem->CalculateHeight(width - 2 * border);
|
||||
SetHeader(infoItem);
|
||||
if (numSearchTimers > 0)
|
||||
@ -653,7 +653,7 @@ cRecMenuSearchTimers::~cRecMenuSearchTimers(void) {
|
||||
|
||||
void cRecMenuSearchTimers::SetMenuItems(void) {
|
||||
for (int i = 0; i < numSearchTimers; i++) {
|
||||
AddMenuItemInitial(new cRecMenuItemSearchTimer(searchTimers[i], rmsSearchTimerEdit, rmsSearchTimerDeleteConfirm, (i==0)?true:false));
|
||||
AddMenuItemInitial(new cRecMenuItemSearchTimer(searchTimers[i], rmsSearchTimerEdit, rmsSearchTimerDeleteConfirm, rmsSearchTimerTest, (i==0)?true:false));
|
||||
}
|
||||
}
|
||||
|
||||
@ -665,7 +665,7 @@ cTVGuideSearchTimer cRecMenuSearchTimers::GetSearchTimer(void) {
|
||||
cRecMenuItem *cRecMenuSearchTimers::GetMenuItem(int number) {
|
||||
if (number < 0 || number >= numSearchTimers)
|
||||
return NULL;
|
||||
return new cRecMenuItemSearchTimer(searchTimers[number], rmsSearchTimerEdit, rmsSearchTimerDelete, false);
|
||||
return new cRecMenuItemSearchTimer(searchTimers[number], rmsSearchTimerEdit, rmsSearchTimerDelete, rmsSearchTimerTest, false);
|
||||
}
|
||||
|
||||
int cRecMenuSearchTimers::GetTotalNumMenuItems(void) {
|
||||
@ -709,10 +709,10 @@ cRecMenuSearchTimerEdit::cRecMenuSearchTimerEdit(cTVGuideSearchTimer searchTimer
|
||||
} else {
|
||||
infoText = tr("Create Search Timer");
|
||||
}
|
||||
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*infoText);
|
||||
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*infoText, true);
|
||||
infoItem->CalculateHeight(width - 2 * border);
|
||||
SetHeader(infoItem);
|
||||
cRecMenuItemButtonYesNo *footerButton = new cRecMenuItemButtonYesNo(tr("Save Search Timer"), tr("Cancel"), rmsSearchTimerSave, rmsSearchTimers, false);
|
||||
cRecMenuItemButtonYesNo *footerButton = new cRecMenuItemButtonYesNo(tr("Save Search Timer"), tr("Cancel"), rmsSearchTimerSave, rmsSearchTimers, (advancedOptions)?false:true);
|
||||
SetFooter(footerButton);
|
||||
InitMenuItems();
|
||||
CreateMenuItems();
|
||||
@ -818,7 +818,7 @@ void cRecMenuSearchTimerEdit::CreateMenuItems(void) {
|
||||
int numMenuItemsAll = currentMenuItems.size();
|
||||
int start = GetStartIndex();
|
||||
for (int i = start; i < numMenuItemsAll; i++) {
|
||||
if ((i == start) && !reDraw) {
|
||||
if ((i == start) && !reDraw && advancedOptions) {
|
||||
currentMenuItems[i]->setActive();
|
||||
}
|
||||
if (!AddMenuItemInitial(currentMenuItems[i])) {
|
||||
@ -891,7 +891,7 @@ cRecMenuSearchTimerDeleteConfirm::cRecMenuSearchTimerDeleteConfirm(cTVGuideSearc
|
||||
SetWidthPercent(70);
|
||||
cString message = tr("Really delete Search Timer");
|
||||
cString infoText = cString::sprintf("%s \"%s\"?", *message, searchTimer.SearchString().c_str());
|
||||
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*infoText);
|
||||
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*infoText, true);
|
||||
infoItem->CalculateHeight(width - 2 * border);
|
||||
SetHeader(infoItem);
|
||||
AddMenuItem(new cRecMenuItemButton(tr("Delete only Search Timer"), rmsSearchTimerDelete, true));
|
||||
@ -968,7 +968,7 @@ cRecMenuSearchTimerResults::cRecMenuSearchTimerResults(std::string searchString,
|
||||
} else {
|
||||
infoText = cString::sprintf("%d %s:\n\"%s\"", numResults, (numResults>1)?(*message1):(*message2), searchString.c_str());
|
||||
}
|
||||
cRecMenuItem *infoItem = new cRecMenuItemInfo(*infoText);
|
||||
cRecMenuItem *infoItem = new cRecMenuItemInfo(*infoText, true);
|
||||
infoItem->CalculateHeight(width - 2 * border);
|
||||
SetHeader(infoItem);
|
||||
|
||||
@ -1033,7 +1033,7 @@ cRecMenuSwitchTimer::cRecMenuSwitchTimer(void) {
|
||||
SetWidthPercent(60);
|
||||
|
||||
cString infoText = tr("Configure Options for Switchtimer");
|
||||
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*infoText);
|
||||
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*infoText, true);
|
||||
infoItem->CalculateHeight(width - 2 * border);
|
||||
AddMenuItem(infoItem);
|
||||
|
||||
@ -1107,7 +1107,7 @@ cRecMenuSearch::cRecMenuSearch(std::string searchString, bool withOptions) {
|
||||
useDescription = false;
|
||||
SetWidthPercent(60);
|
||||
cString infoText = tr("Search");
|
||||
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*infoText);
|
||||
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*infoText, true);
|
||||
infoItem->CalculateHeight(width - 2 * border);
|
||||
SetHeader(infoItem);
|
||||
AddMenuItem(new cRecMenuItemText(tr("Search Expression:"), this->searchString, TEXTINPUTLENGTH, false, this->searchString));
|
||||
@ -1146,11 +1146,12 @@ Epgsearch_searchresults_v1_0 cRecMenuSearch::GetEPGSearchStruct(void) {
|
||||
cRecMenuSearchResults::cRecMenuSearchResults(std::string searchString, const cEvent **searchResults, int numResults) {
|
||||
this->searchResults = searchResults;
|
||||
SetWidthPercent(70);
|
||||
this->searchString = searchString;
|
||||
this->numResults = numResults;
|
||||
cString message1 = tr("search results for");
|
||||
cString message2 = tr("search result for");
|
||||
cString infoText = cString::sprintf("%d %s:\n\"%s\"", numResults, (numResults>1)?(*message1):(*message2), searchString.c_str());
|
||||
cRecMenuItem *infoItem = new cRecMenuItemInfo(*infoText);
|
||||
cRecMenuItem *infoItem = new cRecMenuItemInfo(*infoText, true);
|
||||
infoItem->CalculateHeight(width - 2 * border);
|
||||
SetHeader(infoItem);
|
||||
|
||||
@ -1210,12 +1211,21 @@ cRecMenuSearchConfirmTimer::cRecMenuSearchConfirmTimer(const cEvent *event) {
|
||||
}
|
||||
|
||||
// --- cRecMenuSearchNothingFound ---------------------------------------------------------
|
||||
cRecMenuSearchNothingFound::cRecMenuSearchNothingFound(std::string searchString) {
|
||||
cRecMenuSearchNothingFound::cRecMenuSearchNothingFound(std::string searchString, bool tooShort) {
|
||||
SetWidthPercent(50);
|
||||
cString message = tr("Nothing found for Search String");
|
||||
cString text = cString::sprintf("%s\n\"%s\"",
|
||||
*message,
|
||||
searchString.c_str());
|
||||
cString text;
|
||||
if (!tooShort) {
|
||||
cString message = tr("Nothing found for Search String");
|
||||
text = cString::sprintf("%s\n\"%s\"",
|
||||
*message,
|
||||
searchString.c_str());
|
||||
} else {
|
||||
cString message = tr("Search String has to have at least three letters");
|
||||
text = cString::sprintf("%s\n\"%s\"",
|
||||
*message,
|
||||
searchString.c_str());
|
||||
|
||||
}
|
||||
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*text);
|
||||
infoItem->CalculateHeight(width - 2 * border);
|
||||
AddMenuItem(infoItem);
|
||||
@ -1234,7 +1244,7 @@ cRecMenuRecordingSearch::cRecMenuRecordingSearch(std::string search) {
|
||||
strncpy(searchString, search.c_str(), TEXTINPUTLENGTH);
|
||||
SetWidthPercent(60);
|
||||
cString infoText = tr("Search in Recordings");
|
||||
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*infoText);
|
||||
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*infoText, true);
|
||||
infoItem->CalculateHeight(width - 2 * border);
|
||||
SetHeader(infoItem);
|
||||
|
||||
@ -1256,7 +1266,7 @@ cRecMenuRecordingSearchResults::cRecMenuRecordingSearchResults(std::string searc
|
||||
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);
|
||||
cRecMenuItem *infoItem = new cRecMenuItemInfo(*infoText, true);
|
||||
infoItem->CalculateHeight(width - 2 * border);
|
||||
SetHeader(infoItem);
|
||||
|
||||
|
@ -361,6 +361,7 @@ public:
|
||||
// --- cRecMenuSearchResults ---------------------------------------------------------
|
||||
class cRecMenuSearchResults: public cRecMenu {
|
||||
private:
|
||||
std::string searchString;
|
||||
const cEvent **searchResults;
|
||||
int numResults;
|
||||
public:
|
||||
@ -371,6 +372,7 @@ public:
|
||||
delete[] searchResults;
|
||||
};
|
||||
const cEvent *GetEvent(void);
|
||||
std::string GetSearchString(void) { return searchString; };
|
||||
};
|
||||
|
||||
// --- cRecMenuSearchConfirmTimer ---------------------------------------------------------
|
||||
@ -383,7 +385,7 @@ public:
|
||||
// --- cRecMenuSearchNothingFound ---------------------------------------------------------
|
||||
class cRecMenuSearchNothingFound: public cRecMenu {
|
||||
public:
|
||||
cRecMenuSearchNothingFound(std::string searchString);
|
||||
cRecMenuSearchNothingFound(std::string searchString, bool tooShort = false);
|
||||
virtual ~cRecMenuSearchNothingFound(void) {};
|
||||
};
|
||||
|
||||
|
@ -198,8 +198,11 @@ bool cTVGuideSearchTimer::Parse(bool readTemplate) {
|
||||
ID = atoi(values[value].c_str());
|
||||
break;
|
||||
case 1:
|
||||
if (!readTemplate)
|
||||
searchString = values[value];
|
||||
if (!readTemplate) {
|
||||
std::string searchStringMasked = values[value];
|
||||
std::replace(searchStringMasked.begin(), searchStringMasked.end(), '|', ':');
|
||||
searchString = searchStringMasked;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
useTime = atoi(values[value].c_str());
|
||||
|
2
setup.c
2
setup.c
@ -338,7 +338,7 @@ void cMenuSetupFont::Set(void) {
|
||||
|
||||
Add(new cMenuEditIntItem(tr("Search & Recording Menu Font Size"), &tmpTvguideConfig->FontRecMenuItemDelta, -30, 30));
|
||||
Add(new cMenuEditIntItem(tr("Search & Recording Menu Small Font Size"), &tmpTvguideConfig->FontRecMenuItemSmallDelta, -30, 30));
|
||||
Add(new cMenuEditIntItem(tr("Search & Recording Main Menu Font Size"), &tmpTvguideConfig->FontRecMenuItemLargeDelta, -30, 30));
|
||||
Add(new cMenuEditIntItem(tr("Search & Recording Menu Header Font Size"), &tmpTvguideConfig->FontRecMenuItemLargeDelta, -30, 30));
|
||||
|
||||
SetCurrent(Get(currentItem));
|
||||
Display();
|
||||
|
Loading…
Reference in New Issue
Block a user