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) - added theme "keep it simple" (thanks @saman)
- display of additional EPG pictures in detailed epg view - display of additional EPG pictures in detailed epg view
- Introduction of "Search & Recording" Menu - Introduction of "Search & Recording" Menu
- added possibility to replace original VDR schedules menu

View File

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

View File

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

View File

@ -3,7 +3,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: vdr-tvguide 0.0.1\n" "Project-Id-Version: vdr-tvguide 0.0.1\n"
"Report-Msgid-Bugs-To: <see README>\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" "PO-Revision-Date: 2012-08-25 17:49+0200\n"
"Last-Translator: Horst\n" "Last-Translator: Horst\n"
"Language-Team: \n" "Language-Team: \n"
@ -399,6 +399,9 @@ msgstr "immer"
msgid "Show Main Menu Entry" msgid "Show Main Menu Entry"
msgstr "Hauptmenüeintrag anzeigen" msgstr "Hauptmenüeintrag anzeigen"
msgid "Replace VDR Schedules Menu"
msgstr "VDR Programm Menü ersetzen"
msgid "Theme" msgid "Theme"
msgstr "Theme" msgstr "Theme"

View File

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