mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
added possibility to replace original VDR schedules menu
This commit is contained in:
parent
6a6e477b7a
commit
ba3d6c07d0
1
HISTORY
1
HISTORY
@ -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
|
||||
|
2
config.c
2
config.c
@ -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);
|
||||
|
1
config.h
1
config.h
@ -13,6 +13,7 @@ class cTvguideConfig {
|
||||
void SetIconsPath(cString path);
|
||||
void SetBlending(void);
|
||||
int showMainMenuEntry;
|
||||
int replaceOriginalSchedule;
|
||||
int osdWidth;
|
||||
int osdHeight;
|
||||
int displayMode;
|
||||
|
@ -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"
|
||||
|
||||
|
2
setup.c
2
setup.c
@ -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));
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user