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
|
- added vps token in menudetailepg
|
||||||
- implemented cSDDisplayMenu::GetTextAreaFont()
|
- implemented cSDDisplayMenu::GetTextAreaFont()
|
||||||
- introduced new viewelement audioinfo in displaychannel
|
- 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;
|
rerunAmount = 10;
|
||||||
rerunDistance = 2;
|
rerunDistance = 2;
|
||||||
rerunMaxChannel = 0;
|
rerunMaxChannel = 0;
|
||||||
|
//menu display style, display menu items
|
||||||
|
//one after each other or in one step
|
||||||
|
blockFlush = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
cDesignerConfig::~cDesignerConfig() {
|
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, "RerunAmount")) rerunAmount = atoi(Value);
|
||||||
else if (!strcasecmp(Name, "RerunDistance")) rerunDistance = atoi(Value);
|
else if (!strcasecmp(Name, "RerunDistance")) rerunDistance = atoi(Value);
|
||||||
else if (!strcasecmp(Name, "RerunMaxChannel")) rerunMaxChannel = atoi(Value);
|
else if (!strcasecmp(Name, "RerunMaxChannel")) rerunMaxChannel = atoi(Value);
|
||||||
|
else if (!strcasecmp(Name, "BlockFlush")) blockFlush = atoi(Value);
|
||||||
else return false;
|
else return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
2
config.h
2
config.h
@ -46,7 +46,9 @@ public:
|
|||||||
int rerunAmount;
|
int rerunAmount;
|
||||||
int rerunDistance;
|
int rerunDistance;
|
||||||
int rerunMaxChannel;
|
int rerunMaxChannel;
|
||||||
|
int blockFlush;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef DEFINE_CONFIG
|
#ifdef DEFINE_CONFIG
|
||||||
bool firstDisplay = true;
|
bool firstDisplay = true;
|
||||||
cDesignerConfig config;
|
cDesignerConfig config;
|
||||||
|
@ -79,6 +79,7 @@ bool cSDDisplayMenu::SetItemEvent(const cEvent *Event, int Index, bool Current,
|
|||||||
return true;
|
return true;
|
||||||
if (!rootView->SubViewAvailable())
|
if (!rootView->SubViewAvailable())
|
||||||
return false;
|
return false;
|
||||||
|
if (config.blockFlush)
|
||||||
rootView->LockFlush();
|
rootView->LockFlush();
|
||||||
if (Current) {
|
if (Current) {
|
||||||
if (Channel) {
|
if (Channel) {
|
||||||
@ -101,6 +102,7 @@ bool cSDDisplayMenu::SetItemTimer(const cTimer *Timer, int Index, bool Current,
|
|||||||
return true;
|
return true;
|
||||||
if (!rootView->SubViewAvailable())
|
if (!rootView->SubViewAvailable())
|
||||||
return false;
|
return false;
|
||||||
|
if (config.blockFlush)
|
||||||
rootView->LockFlush();
|
rootView->LockFlush();
|
||||||
cDisplayMenuListView *list = rootView->GetListView();
|
cDisplayMenuListView *list = rootView->GetListView();
|
||||||
if (!list)
|
if (!list)
|
||||||
@ -116,6 +118,7 @@ bool cSDDisplayMenu::SetItemChannel(const cChannel *Channel, int Index, bool Cur
|
|||||||
return true;
|
return true;
|
||||||
if (!rootView->SubViewAvailable())
|
if (!rootView->SubViewAvailable())
|
||||||
return false;
|
return false;
|
||||||
|
if (config.blockFlush)
|
||||||
rootView->LockFlush();
|
rootView->LockFlush();
|
||||||
cDisplayMenuListView *list = rootView->GetListView();
|
cDisplayMenuListView *list = rootView->GetListView();
|
||||||
if (!list)
|
if (!list)
|
||||||
@ -131,6 +134,7 @@ bool cSDDisplayMenu::SetItemRecording(const cRecording *Recording, int Index, bo
|
|||||||
return true;
|
return true;
|
||||||
if (!rootView->SubViewAvailable())
|
if (!rootView->SubViewAvailable())
|
||||||
return false;
|
return false;
|
||||||
|
if (config.blockFlush)
|
||||||
rootView->LockFlush();
|
rootView->LockFlush();
|
||||||
cDisplayMenuListView *list = rootView->GetListView();
|
cDisplayMenuListView *list = rootView->GetListView();
|
||||||
if (!list)
|
if (!list)
|
||||||
@ -148,6 +152,7 @@ void cSDDisplayMenu::SetItem(const char *Text, int Index, bool Current, bool Sel
|
|||||||
if (!list) {
|
if (!list) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (config.blockFlush)
|
||||||
rootView->LockFlush();
|
rootView->LockFlush();
|
||||||
eMenuCategory cat = MenuCategory();
|
eMenuCategory cat = MenuCategory();
|
||||||
if (cat == mcMain) {
|
if (cat == mcMain) {
|
||||||
@ -243,6 +248,7 @@ void cSDDisplayMenu::Flush(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (doFlush) {
|
if (doFlush) {
|
||||||
|
if (config.blockFlush)
|
||||||
rootView->OpenFlush();
|
rootView->OpenFlush();
|
||||||
rootView->DoFlush();
|
rootView->DoFlush();
|
||||||
}
|
}
|
||||||
|
11
po/de_DE.po
11
po/de_DE.po
@ -6,7 +6,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: vdr-skindesigner 0.0.1\n"
|
"Project-Id-Version: vdr-skindesigner 0.0.1\n"
|
||||||
"Report-Msgid-Bugs-To: <see README>\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"
|
"PO-Revision-Date: 2014-09-27 11:02+0200\n"
|
||||||
"Last-Translator: Louis Braun <louis.braun@gmx.de>\n"
|
"Last-Translator: Louis Braun <louis.braun@gmx.de>\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
@ -15,6 +15,15 @@ msgstr ""
|
|||||||
"Content-Type: text/plain; charset=utf-8\n"
|
"Content-Type: text/plain; charset=utf-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\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"
|
msgid "Reruns"
|
||||||
msgstr "Wiederholungen"
|
msgstr "Wiederholungen"
|
||||||
|
|
||||||
|
5
setup.c
5
setup.c
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
cSkinDesignerSetup::cSkinDesignerSetup() {
|
cSkinDesignerSetup::cSkinDesignerSetup() {
|
||||||
data = config;
|
data = config;
|
||||||
|
menuDisplayStyle[0] = tr("after one another");
|
||||||
|
menuDisplayStyle[1] = tr("at one go");
|
||||||
Setup();
|
Setup();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -13,6 +15,8 @@ void cSkinDesignerSetup::Setup(void) {
|
|||||||
int current = Current();
|
int current = Current();
|
||||||
Clear();
|
Clear();
|
||||||
|
|
||||||
|
Add(new cMenuEditStraItem(tr("Menu Item display method"), &data.blockFlush, 2, menuDisplayStyle));
|
||||||
|
|
||||||
cString message = cString::sprintf("---------------- %s ----------------", tr("Reruns"));
|
cString message = cString::sprintf("---------------- %s ----------------", tr("Reruns"));
|
||||||
Add(new cOsdItem(*message));
|
Add(new cOsdItem(*message));
|
||||||
cList<cOsdItem>::Last()->SetSelectable(false);
|
cList<cOsdItem>::Last()->SetSelectable(false);
|
||||||
@ -91,4 +95,5 @@ void cSkinDesignerSetup::Store(void) {
|
|||||||
SetupStore("RerunAmount", config.rerunAmount);
|
SetupStore("RerunAmount", config.rerunAmount);
|
||||||
SetupStore("RerunDistance", config.rerunDistance);
|
SetupStore("RerunDistance", config.rerunDistance);
|
||||||
SetupStore("RerunMaxChannel", config.rerunMaxChannel);
|
SetupStore("RerunMaxChannel", config.rerunMaxChannel);
|
||||||
|
SetupStore("BlockFlush", config.blockFlush);
|
||||||
}
|
}
|
1
setup.h
1
setup.h
@ -9,6 +9,7 @@ class cSkinDesignerSetup : public cMenuSetupPage {
|
|||||||
virtual ~cSkinDesignerSetup();
|
virtual ~cSkinDesignerSetup();
|
||||||
private:
|
private:
|
||||||
cDesignerConfig data;
|
cDesignerConfig data;
|
||||||
|
const char *menuDisplayStyle[2];
|
||||||
void Setup(void);
|
void Setup(void);
|
||||||
virtual eOSState ProcessKey(eKeys Key);
|
virtual eOSState ProcessKey(eKeys Key);
|
||||||
virtual void Store(void);
|
virtual void Store(void);
|
||||||
|
Loading…
Reference in New Issue
Block a user