mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
Added setup option to switch functionality of keys Blue and OK
This commit is contained in:
parent
daac1abd7d
commit
10c1a1d8ce
1
HISTORY
1
HISTORY
@ -40,3 +40,4 @@ VDR Plugin 'tvguide' Revision History
|
||||
- Display of Main Menu Entry configurable
|
||||
- Eliminated setup option "Number of channels to jump", directly jump
|
||||
number of channel columns / rows with green / yellow
|
||||
- Added setup option to switch functionality of keys "Blue" and "OK"
|
||||
|
2
config.c
2
config.c
@ -46,6 +46,7 @@ cTvguideConfig::cTvguideConfig() {
|
||||
hugeStepHours = 24;
|
||||
channelJumpMode = eNumJump;
|
||||
jumpChannels = 0;
|
||||
blueKeyMode = 0;
|
||||
hideLastGroup = 0;
|
||||
hideChannelLogos = 0;
|
||||
logoWidthRatio = 13;
|
||||
@ -254,6 +255,7 @@ bool cTvguideConfig::SetupParse(const char *Name, const char *Value) {
|
||||
else if (strcmp(Name, "bigStepHours") == 0) bigStepHours = atoi(Value);
|
||||
else if (strcmp(Name, "hugeStepHours") == 0) hugeStepHours = atoi(Value);
|
||||
else if (strcmp(Name, "channelJumpMode") == 0) channelJumpMode = atoi(Value);
|
||||
else if (strcmp(Name, "blueKeyMode") == 0) blueKeyMode = atoi(Value);
|
||||
else if (strcmp(Name, "hideLastGroup") == 0) hideLastGroup = atoi(Value);
|
||||
else if (strcmp(Name, "hideEpgImages") == 0) hideEpgImages = atoi(Value);
|
||||
else if (strcmp(Name, "epgImageWidth") == 0) epgImageWidth = atoi(Value);
|
||||
|
1
config.h
1
config.h
@ -46,6 +46,7 @@ class cTvguideConfig {
|
||||
int hugeStepHours;
|
||||
int channelJumpMode;
|
||||
int jumpChannels;
|
||||
int blueKeyMode;
|
||||
int hideLastGroup;
|
||||
int hideChannelLogos;
|
||||
int logoWidthRatio;
|
||||
|
6
footer.c
6
footer.c
@ -63,7 +63,11 @@ void cFooter::drawYellowButton(const char *text) {
|
||||
}
|
||||
|
||||
void cFooter::drawBlueButton() {
|
||||
cString text(tr("Switch to Channel"));
|
||||
cString text;
|
||||
if (tvguideConfig.blueKeyMode == 0)
|
||||
text = tr("Switch to Channel");
|
||||
else if (tvguideConfig.blueKeyMode == 1)
|
||||
text = tr("Detailed EPG");
|
||||
DrawButton(*text, theme.Color(clrButtonBlue), theme.Color(clrButtonBlueBorder), 3);
|
||||
}
|
||||
|
||||
|
14
po/de_DE.po
14
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: 2013-06-01 10:39+0200\n"
|
||||
"POT-Creation-Date: 2013-06-01 11:02+0200\n"
|
||||
"PO-Revision-Date: 2012-08-25 17:49+0200\n"
|
||||
"Last-Translator: Horst\n"
|
||||
"Language-Team: \n"
|
||||
@ -33,6 +33,9 @@ msgstr "Kanäle vor"
|
||||
msgid "Switch to Channel"
|
||||
msgstr "Umschalten"
|
||||
|
||||
msgid "Detailed EPG"
|
||||
msgstr "Detailiertes EPG"
|
||||
|
||||
msgid "General Settings"
|
||||
msgstr "Allgemeine Einstellungen"
|
||||
|
||||
@ -48,6 +51,12 @@ msgstr "x Kanäle zurück / vor"
|
||||
msgid "previous / next channel group"
|
||||
msgstr "vorherige / nächste Kanalgruppe"
|
||||
|
||||
msgid "Blue: Channel Switch, Ok: Detailed EPG"
|
||||
msgstr "Blau: Umschalten, OK: Detailiertes EPG"
|
||||
|
||||
msgid "Blue: Detailed EPG, Ok: Channel Switch"
|
||||
msgstr "Blau: Detailiertes EPG, OK: Umschalten"
|
||||
|
||||
msgid "never"
|
||||
msgstr "nie"
|
||||
|
||||
@ -69,6 +78,9 @@ msgstr "Abgerundete Ecken"
|
||||
msgid "Channel Jump Mode (Keys Green / Yellow)"
|
||||
msgstr "Kanalsprung Modus (Tasten grün / gelb)"
|
||||
|
||||
msgid "Keys Blue and OK"
|
||||
msgstr "Tasten Blau und OK"
|
||||
|
||||
msgid "Hide last Channel Group"
|
||||
msgstr "Letzte Kanalgruppe verstecken"
|
||||
|
||||
|
4
setup.c
4
setup.c
@ -62,6 +62,7 @@ void cTvguideSetup::Store(void) {
|
||||
SetupStore("bigStepHours", tvguideConfig.bigStepHours);
|
||||
SetupStore("hugeStepHours", tvguideConfig.hugeStepHours);
|
||||
SetupStore("channelJumpMode", tvguideConfig.channelJumpMode);
|
||||
SetupStore("blueKeyMode", tvguideConfig.blueKeyMode);
|
||||
SetupStore("hideLastGroup", tvguideConfig.hideLastGroup);
|
||||
SetupStore("hideChannelLogos", tvguideConfig.hideChannelLogos);
|
||||
SetupStore("logoExtension", tvguideConfig.logoExtension);
|
||||
@ -135,6 +136,8 @@ cMenuSetupGeneral::cMenuSetupGeneral(cTvguideConfig* data) : cMenuSetupSubMenu(
|
||||
timeFormatItems[1] = "24h";
|
||||
jumpMode[0] = tr("x channels back / forward");
|
||||
jumpMode[1] = tr("previous / next channel group");
|
||||
blueMode[0] = tr("Blue: Channel Switch, Ok: Detailed EPG");
|
||||
blueMode[1] = tr("Blue: Detailed EPG, Ok: Channel Switch");
|
||||
useSubtitleRerunTexts[0] = tr("never");
|
||||
useSubtitleRerunTexts[1] = tr("if exists");
|
||||
useSubtitleRerunTexts[2] = tr("always");
|
||||
@ -151,6 +154,7 @@ void cMenuSetupGeneral::Set(void) {
|
||||
Add(new cMenuEditBoolItem(tr("Rounded Corners"), &tmpTvguideConfig->roundedCorners));
|
||||
|
||||
Add(new cMenuEditStraItem(tr("Channel Jump Mode (Keys Green / Yellow)"), &tmpTvguideConfig->channelJumpMode, 2, jumpMode));
|
||||
Add(new cMenuEditStraItem(tr("Keys Blue and OK"), &tmpTvguideConfig->blueKeyMode, 2, blueMode));
|
||||
Add(new cMenuEditBoolItem(tr("Hide last Channel Group"), &tmpTvguideConfig->hideLastGroup));
|
||||
Add(new cMenuEditIntItem(tr("Time to display in minutes"), &tmpTvguideConfig->displayTime, 120, 320));
|
||||
Add(new cMenuEditIntItem(tr("Big Step (Keys 1 / 3) in hours"), &tmpTvguideConfig->bigStepHours, 1, 12));
|
||||
|
1
setup.h
1
setup.h
@ -30,6 +30,7 @@ class cMenuSetupGeneral : public cMenuSetupSubMenu {
|
||||
cThemes themes;
|
||||
const char * timeFormatItems[2];
|
||||
const char * jumpMode[2];
|
||||
const char * blueMode[2];
|
||||
const char *useSubtitleRerunTexts[3];
|
||||
void Set(void);
|
||||
public:
|
||||
|
50
tvguideosd.c
50
tvguideosd.c
@ -444,21 +444,6 @@ void cTvGuideOsd::processKeyRight() {
|
||||
}
|
||||
}
|
||||
|
||||
void cTvGuideOsd::processKeyOk() {
|
||||
if (detailViewActive) {
|
||||
delete detailView;
|
||||
detailView = NULL;
|
||||
detailViewActive = false;
|
||||
osdManager.flush();
|
||||
} else {
|
||||
if (!activeGrid->isDummy()) {
|
||||
detailViewActive = true;
|
||||
detailView = new cDetailView(activeGrid);
|
||||
detailView->Start();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void cTvGuideOsd::processKeyRed() {
|
||||
if ((activeGrid == NULL) || activeGrid->isDummy())
|
||||
return;
|
||||
@ -553,6 +538,24 @@ void cTvGuideOsd::processKeyYellow() {
|
||||
}
|
||||
|
||||
eOSState cTvGuideOsd::processKeyBlue() {
|
||||
if (tvguideConfig.blueKeyMode == 0) {
|
||||
return ChannelSwitch();
|
||||
} else if (tvguideConfig.blueKeyMode == 1) {
|
||||
DetailedEPG();
|
||||
}
|
||||
return osContinue;
|
||||
}
|
||||
|
||||
eOSState cTvGuideOsd::processKeyOk() {
|
||||
if ((tvguideConfig.blueKeyMode == 0) || detailViewActive ) {
|
||||
DetailedEPG();
|
||||
} else if (tvguideConfig.blueKeyMode == 1) {
|
||||
return ChannelSwitch();
|
||||
}
|
||||
return osContinue;
|
||||
}
|
||||
|
||||
eOSState cTvGuideOsd::ChannelSwitch() {
|
||||
if (activeGrid == NULL)
|
||||
return osContinue;
|
||||
const cChannel *currentChannel = activeGrid->column->getChannel();
|
||||
@ -563,6 +566,21 @@ eOSState cTvGuideOsd::processKeyBlue() {
|
||||
return osContinue;
|
||||
}
|
||||
|
||||
void cTvGuideOsd::DetailedEPG() {
|
||||
if (detailViewActive) {
|
||||
delete detailView;
|
||||
detailView = NULL;
|
||||
detailViewActive = false;
|
||||
osdManager.flush();
|
||||
} else {
|
||||
if (!activeGrid->isDummy()) {
|
||||
detailViewActive = true;
|
||||
detailView = new cDetailView(activeGrid);
|
||||
detailView->Start();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void cTvGuideOsd::processKey1() {
|
||||
bool tooFarInPast = myTime->DelStep(tvguideConfig.bigStepHours*60);
|
||||
if (tooFarInPast)
|
||||
@ -642,7 +660,7 @@ eOSState cTvGuideOsd::ProcessKey(eKeys Key) {
|
||||
case kGreen: processKeyGreen(); break;
|
||||
case kYellow: processKeyYellow(); break;
|
||||
case kBlue: state = processKeyBlue(); break;
|
||||
case kOk: processKeyOk(); break;
|
||||
case kOk: state = processKeyOk(); break;
|
||||
case kBack: state=osEnd; break;
|
||||
case k1: processKey1(); break;
|
||||
case k3: processKey3(); break;
|
||||
|
@ -26,7 +26,7 @@ private:
|
||||
void processKeyGreen();
|
||||
void processKeyYellow();
|
||||
eOSState processKeyBlue();
|
||||
void processKeyOk();
|
||||
eOSState processKeyOk();
|
||||
void processKey1();
|
||||
void processKey3();
|
||||
void processKey4();
|
||||
@ -40,6 +40,8 @@ private:
|
||||
void timeBack();
|
||||
void ScrollForward();
|
||||
void ScrollBack();
|
||||
eOSState ChannelSwitch();
|
||||
void DetailedEPG();
|
||||
void dump();
|
||||
public:
|
||||
cTvGuideOsd(void);
|
||||
|
Loading…
Reference in New Issue
Block a user