mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
added setup option to choose Menu Item display method
This commit is contained in:
parent
df57e20e06
commit
a9f7a65578
1
HISTORY
1
HISTORY
@ -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"
|
||||
|
4
config.c
4
config.c
@ -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;
|
||||
}
|
||||
|
2
config.h
2
config.h
@ -46,7 +46,9 @@ public:
|
||||
int rerunAmount;
|
||||
int rerunDistance;
|
||||
int rerunMaxChannel;
|
||||
int blockFlush;
|
||||
};
|
||||
|
||||
#ifdef DEFINE_CONFIG
|
||||
bool firstDisplay = true;
|
||||
cDesignerConfig config;
|
||||
|
@ -79,7 +79,8 @@ bool cSDDisplayMenu::SetItemEvent(const cEvent *Event, int Index, bool Current,
|
||||
return true;
|
||||
if (!rootView->SubViewAvailable())
|
||||
return false;
|
||||
rootView->LockFlush();
|
||||
if (config.blockFlush)
|
||||
rootView->LockFlush();
|
||||
if (Current) {
|
||||
if (Channel) {
|
||||
rootView->SetChannel(Channel);
|
||||
@ -101,7 +102,8 @@ bool cSDDisplayMenu::SetItemTimer(const cTimer *Timer, int Index, bool Current,
|
||||
return true;
|
||||
if (!rootView->SubViewAvailable())
|
||||
return false;
|
||||
rootView->LockFlush();
|
||||
if (config.blockFlush)
|
||||
rootView->LockFlush();
|
||||
cDisplayMenuListView *list = rootView->GetListView();
|
||||
if (!list)
|
||||
return false;
|
||||
@ -116,7 +118,8 @@ bool cSDDisplayMenu::SetItemChannel(const cChannel *Channel, int Index, bool Cur
|
||||
return true;
|
||||
if (!rootView->SubViewAvailable())
|
||||
return false;
|
||||
rootView->LockFlush();
|
||||
if (config.blockFlush)
|
||||
rootView->LockFlush();
|
||||
cDisplayMenuListView *list = rootView->GetListView();
|
||||
if (!list)
|
||||
return false;
|
||||
@ -131,7 +134,8 @@ bool cSDDisplayMenu::SetItemRecording(const cRecording *Recording, int Index, bo
|
||||
return true;
|
||||
if (!rootView->SubViewAvailable())
|
||||
return false;
|
||||
rootView->LockFlush();
|
||||
if (config.blockFlush)
|
||||
rootView->LockFlush();
|
||||
cDisplayMenuListView *list = rootView->GetListView();
|
||||
if (!list)
|
||||
return false;
|
||||
@ -148,7 +152,8 @@ void cSDDisplayMenu::SetItem(const char *Text, int Index, bool Current, bool Sel
|
||||
if (!list) {
|
||||
return;
|
||||
}
|
||||
rootView->LockFlush();
|
||||
if (config.blockFlush)
|
||||
rootView->LockFlush();
|
||||
eMenuCategory cat = MenuCategory();
|
||||
if (cat == mcMain) {
|
||||
list->AddMainMenuItem(Index, Text, Current, Selectable);
|
||||
@ -243,7 +248,8 @@ void cSDDisplayMenu::Flush(void) {
|
||||
}
|
||||
}
|
||||
if (doFlush) {
|
||||
rootView->OpenFlush();
|
||||
if (config.blockFlush)
|
||||
rootView->OpenFlush();
|
||||
rootView->DoFlush();
|
||||
}
|
||||
state = vsIdle;
|
||||
|
11
po/de_DE.po
11
po/de_DE.po
@ -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"
|
||||
|
||||
|
5
setup.c
5
setup.c
@ -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);
|
||||
}
|
Loading…
Reference in New Issue
Block a user