added setup option to choose Menu Item display method

This commit is contained in:
louis 2014-10-18 09:11:11 +02:00
parent df57e20e06
commit a9f7a65578
8 changed files with 37 additions and 9 deletions

View File

@ -23,3 +23,4 @@ Version 0.0.2
- added vps token in menudetailepg
- implemented cSDDisplayMenu::GetTextAreaFont()
- introduced new viewelement audioinfo in displaychannel
- added setup option to choose Menu Item display method between "at one go" and "after one another"

View File

@ -20,6 +20,9 @@ cDesignerConfig::cDesignerConfig() {
rerunAmount = 10;
rerunDistance = 2;
rerunMaxChannel = 0;
//menu display style, display menu items
//one after each other or in one step
blockFlush = 1;
}
cDesignerConfig::~cDesignerConfig() {
@ -114,6 +117,7 @@ bool cDesignerConfig::SetupParse(const char *Name, const char *Value) {
else if (!strcasecmp(Name, "RerunAmount")) rerunAmount = atoi(Value);
else if (!strcasecmp(Name, "RerunDistance")) rerunDistance = atoi(Value);
else if (!strcasecmp(Name, "RerunMaxChannel")) rerunMaxChannel = atoi(Value);
else if (!strcasecmp(Name, "BlockFlush")) blockFlush = atoi(Value);
else return false;
return true;
}

View File

@ -46,7 +46,9 @@ public:
int rerunAmount;
int rerunDistance;
int rerunMaxChannel;
int blockFlush;
};
#ifdef DEFINE_CONFIG
bool firstDisplay = true;
cDesignerConfig config;

View File

@ -79,6 +79,7 @@ bool cSDDisplayMenu::SetItemEvent(const cEvent *Event, int Index, bool Current,
return true;
if (!rootView->SubViewAvailable())
return false;
if (config.blockFlush)
rootView->LockFlush();
if (Current) {
if (Channel) {
@ -101,6 +102,7 @@ bool cSDDisplayMenu::SetItemTimer(const cTimer *Timer, int Index, bool Current,
return true;
if (!rootView->SubViewAvailable())
return false;
if (config.blockFlush)
rootView->LockFlush();
cDisplayMenuListView *list = rootView->GetListView();
if (!list)
@ -116,6 +118,7 @@ bool cSDDisplayMenu::SetItemChannel(const cChannel *Channel, int Index, bool Cur
return true;
if (!rootView->SubViewAvailable())
return false;
if (config.blockFlush)
rootView->LockFlush();
cDisplayMenuListView *list = rootView->GetListView();
if (!list)
@ -131,6 +134,7 @@ bool cSDDisplayMenu::SetItemRecording(const cRecording *Recording, int Index, bo
return true;
if (!rootView->SubViewAvailable())
return false;
if (config.blockFlush)
rootView->LockFlush();
cDisplayMenuListView *list = rootView->GetListView();
if (!list)
@ -148,6 +152,7 @@ void cSDDisplayMenu::SetItem(const char *Text, int Index, bool Current, bool Sel
if (!list) {
return;
}
if (config.blockFlush)
rootView->LockFlush();
eMenuCategory cat = MenuCategory();
if (cat == mcMain) {
@ -243,6 +248,7 @@ void cSDDisplayMenu::Flush(void) {
}
}
if (doFlush) {
if (config.blockFlush)
rootView->OpenFlush();
rootView->DoFlush();
}

View File

@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: vdr-skindesigner 0.0.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2014-10-11 07:12+0200\n"
"POT-Creation-Date: 2014-10-18 07:30+0200\n"
"PO-Revision-Date: 2014-09-27 11:02+0200\n"
"Last-Translator: Louis Braun <louis.braun@gmx.de>\n"
"Language-Team: \n"
@ -15,6 +15,15 @@ msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "after one another"
msgstr "eines nach dem anderen"
msgid "at one go"
msgstr "alle auf einmal"
msgid "Menu Item display method"
msgstr "Art der Ausgabe der Menüelemente"
msgid "Reruns"
msgstr "Wiederholungen"

View File

@ -2,6 +2,8 @@
cSkinDesignerSetup::cSkinDesignerSetup() {
data = config;
menuDisplayStyle[0] = tr("after one another");
menuDisplayStyle[1] = tr("at one go");
Setup();
}
@ -13,6 +15,8 @@ void cSkinDesignerSetup::Setup(void) {
int current = Current();
Clear();
Add(new cMenuEditStraItem(tr("Menu Item display method"), &data.blockFlush, 2, menuDisplayStyle));
cString message = cString::sprintf("---------------- %s ----------------", tr("Reruns"));
Add(new cOsdItem(*message));
cList<cOsdItem>::Last()->SetSelectable(false);
@ -91,4 +95,5 @@ void cSkinDesignerSetup::Store(void) {
SetupStore("RerunAmount", config.rerunAmount);
SetupStore("RerunDistance", config.rerunDistance);
SetupStore("RerunMaxChannel", config.rerunMaxChannel);
SetupStore("BlockFlush", config.blockFlush);
}

View File

@ -9,6 +9,7 @@ class cSkinDesignerSetup : public cMenuSetupPage {
virtual ~cSkinDesignerSetup();
private:
cDesignerConfig data;
const char *menuDisplayStyle[2];
void Setup(void);
virtual eOSState ProcessKey(eKeys Key);
virtual void Store(void);