added possibility to replace original VDR schedules menu

This commit is contained in:
louis 2013-07-12 16:27:29 +02:00
parent 6a6e477b7a
commit ba3d6c07d0
6 changed files with 18 additions and 2 deletions

View File

@ -48,3 +48,4 @@ VDR Plugin 'tvguide' Revision History
- added theme "keep it simple" (thanks @saman)
- display of additional EPG pictures in detailed epg view
- Introduction of "Search & Recording" Menu
- added possibility to replace original VDR schedules menu

View File

@ -17,6 +17,7 @@ enum {
cTvguideConfig::cTvguideConfig() {
showMainMenuEntry = 1;
replaceOriginalSchedule = 0;
osdWidth = 0;
osdHeight = 0;
displayMode = eHorizontal;
@ -252,6 +253,7 @@ void cTvguideConfig::loadTheme() {
bool cTvguideConfig::SetupParse(const char *Name, const char *Value) {
if (strcmp(Name, "timeFormat") == 0) timeFormat = atoi(Value);
else if (strcmp(Name, "showMainMenuEntry") == 0) showMainMenuEntry = atoi(Value);
else if (strcmp(Name, "replaceOriginalSchedule") == 0) replaceOriginalSchedule = atoi(Value);
else if (strcmp(Name, "themeIndex") == 0) themeIndex = atoi(Value);
else if (strcmp(Name, "displayMode") == 0) displayMode = atoi(Value);
else if (strcmp(Name, "showTimeInGrid") == 0) showTimeInGrid = atoi(Value);

View File

@ -13,6 +13,7 @@ class cTvguideConfig {
void SetIconsPath(cString path);
void SetBlending(void);
int showMainMenuEntry;
int replaceOriginalSchedule;
int osdWidth;
int osdHeight;
int displayMode;

View File

@ -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-07-07 13:43+0200\n"
"POT-Creation-Date: 2013-07-12 16:08+0200\n"
"PO-Revision-Date: 2012-08-25 17:49+0200\n"
"Last-Translator: Horst\n"
"Language-Team: \n"
@ -399,6 +399,9 @@ msgstr "immer"
msgid "Show Main Menu Entry"
msgstr "Hauptmenüeintrag anzeigen"
msgid "Replace VDR Schedules Menu"
msgstr "VDR Programm Menü ersetzen"
msgid "Theme"
msgstr "Theme"

View File

@ -47,6 +47,7 @@ void cTvguideSetup::Store(void) {
SetupStore("themeIndex", tvguideConfig.themeIndex);
SetupStore("showMainMenuEntry", tvguideConfig.showMainMenuEntry);
SetupStore("replaceOriginalSchedule", tvguideConfig.replaceOriginalSchedule);
SetupStore("displayMode", tvguideConfig.displayMode);
SetupStore("showTimeInGrid", tvguideConfig.showTimeInGrid);
SetupStore("displayStatusHeader", tvguideConfig.displayStatusHeader);
@ -154,6 +155,7 @@ void cMenuSetupGeneral::Set(void) {
int currentItem = Current();
Clear();
Add(new cMenuEditBoolItem(tr("Show Main Menu Entry"), &tmpTvguideConfig->showMainMenuEntry));
Add(new cMenuEditBoolItem(tr("Replace VDR Schedules Menu"), &tmpTvguideConfig->replaceOriginalSchedule));
if (themes.NumThemes())
Add(new cMenuEditStraItem(tr("Theme"), &tmpTvguideConfig->themeIndex, themes.NumThemes(), themes.Descriptions()));
Add(new cMenuEditBoolItem(tr("Rounded Corners"), &tmpTvguideConfig->roundedCorners));

View File

@ -192,7 +192,14 @@ bool cPluginTvguide::SetupParse(const char *Name, const char *Value)
bool cPluginTvguide::Service(const char *Id, void *Data)
{
// Handle custom service requests from other plugins
if (strcmp(Id, "MainMenuHooksPatch-v1.0::osSchedule") == 0 && tvguideConfig.replaceOriginalSchedule != 0) {
if (Data == NULL)
return true;
cOsdMenu **menu = (cOsdMenu**) Data;
if (menu)
*menu = (cOsdMenu*) MainMenuAction();
return true;
}
return false;
}