|
|
de1f536 |
diff -up vdr-2.0.4/config.h~ vdr-2.0.4/config.h
|
|
|
de1f536 |
--- vdr-2.0.4/config.h~ 2013-09-07 13:25:10.000000000 +0300
|
|
|
de1f536 |
+++ vdr-2.0.4/config.h 2013-10-23 19:43:24.731445495 +0300
|
|
|
a871dd0 |
@@ -47,6 +47,10 @@
|
|
|
a871dd0 |
#define TIMERMACRO_TITLE "TITLE"
|
|
|
a871dd0 |
#define TIMERMACRO_EPISODE "EPISODE"
|
|
|
cfc0752 |
|
|
|
cfc0752 |
+// The MainMenuHook Patch's version number:
|
|
|
cfc0752 |
+#define MAINMENUHOOKSVERSION "1.0.1"
|
|
|
cfc0752 |
+#define MAINMENUHOOKSVERSNUM 10001 // Version * 10000 + Major * 100 + Minor
|
|
|
cfc0752 |
+
|
|
|
a871dd0 |
#define MINOSDWIDTH 480
|
|
|
a871dd0 |
#define MAXOSDWIDTH 1920
|
|
|
a871dd0 |
#define MINOSDHEIGHT 324
|
|
|
de1f536 |
diff -up vdr-2.0.4/menu.c~ vdr-2.0.4/menu.c
|
|
|
de1f536 |
--- vdr-2.0.4/menu.c~ 2013-10-16 12:46:24.000000000 +0300
|
|
|
de1f536 |
+++ vdr-2.0.4/menu.c 2013-10-23 19:43:24.275436244 +0300
|
|
|
de1f536 |
@@ -3377,15 +3377,31 @@ cMenuMain::cMenuMain(eOSState State, boo
|
|
|
cfc0752 |
|
|
|
cfc0752 |
// Initial submenus:
|
|
|
cfc0752 |
|
|
|
cfc0752 |
+ cOsdObject *menu = NULL;
|
|
|
cfc0752 |
switch (State) {
|
|
|
cfc0752 |
- case osSchedule: AddSubMenu(new cMenuSchedule); break;
|
|
|
cfc0752 |
- case osChannels: AddSubMenu(new cMenuChannels); break;
|
|
|
cfc0752 |
- case osTimers: AddSubMenu(new cMenuTimers); break;
|
|
|
de1f536 |
- case osRecordings: AddSubMenu(new cMenuRecordings(NULL, 0, OpenSubMenus)); break;
|
|
|
cfc0752 |
- case osSetup: AddSubMenu(new cMenuSetup); break;
|
|
|
cfc0752 |
- case osCommands: AddSubMenu(new cMenuCommands(tr("Commands"), &Commands)); break;
|
|
|
cfc0752 |
+ case osSchedule:
|
|
|
cfc0752 |
+ if (!cPluginManager::CallFirstService("MainMenuHooksPatch-v1.0::osSchedule", &menu))
|
|
|
cfc0752 |
+ menu = new cMenuSchedule;
|
|
|
cfc0752 |
+ break;
|
|
|
cfc0752 |
+ case osChannels:
|
|
|
cfc0752 |
+ if (!cPluginManager::CallFirstService("MainMenuHooksPatch-v1.0::osChannels", &menu))
|
|
|
cfc0752 |
+ menu = new cMenuChannels;
|
|
|
cfc0752 |
+ break;
|
|
|
cfc0752 |
+ case osTimers:
|
|
|
cfc0752 |
+ if (!cPluginManager::CallFirstService("MainMenuHooksPatch-v1.0::osTimers", &menu))
|
|
|
cfc0752 |
+ menu = new cMenuTimers;
|
|
|
cfc0752 |
+ break;
|
|
|
cfc0752 |
+ case osRecordings:
|
|
|
cfc0752 |
+ if (!cPluginManager::CallFirstService("MainMenuHooksPatch-v1.0::osRecordings", &menu))
|
|
|
de1f536 |
+ menu = new cMenuRecordings(NULL, 0, OpenSubMenus);
|
|
|
cfc0752 |
+ break;
|
|
|
cfc0752 |
+ case osSetup: menu = new cMenuSetup; break;
|
|
|
cfc0752 |
+ case osCommands: menu = new cMenuCommands(tr("Commands"), &Commands); break;
|
|
|
cfc0752 |
default: break;
|
|
|
cfc0752 |
}
|
|
|
cfc0752 |
+ if (menu)
|
|
|
cfc0752 |
+ if (menu->IsMenu())
|
|
|
cfc0752 |
+ AddSubMenu((cOsdMenu *) menu);
|
|
|
cfc0752 |
}
|
|
|
cfc0752 |
|
|
|
cfc0752 |
cOsdObject *cMenuMain::PluginOsdObject(void)
|
|
|
de1f536 |
@@ -3493,13 +3509,34 @@ eOSState cMenuMain::ProcessKey(eKeys Key
|
|
|
cfc0752 |
eOSState state = cOsdMenu::ProcessKey(Key);
|
|
|
cfc0752 |
HadSubMenu |= HasSubMenu();
|
|
|
cfc0752 |
|
|
|
cfc0752 |
+ cOsdObject *menu = NULL;
|
|
|
cfc0752 |
switch (state) {
|
|
|
cfc0752 |
- case osSchedule: return AddSubMenu(new cMenuSchedule);
|
|
|
cfc0752 |
- case osChannels: return AddSubMenu(new cMenuChannels);
|
|
|
cfc0752 |
- case osTimers: return AddSubMenu(new cMenuTimers);
|
|
|
cfc0752 |
- case osRecordings: return AddSubMenu(new cMenuRecordings);
|
|
|
cfc0752 |
- case osSetup: return AddSubMenu(new cMenuSetup);
|
|
|
cfc0752 |
- case osCommands: return AddSubMenu(new cMenuCommands(tr("Commands"), &Commands));
|
|
|
cfc0752 |
+ case osSchedule:
|
|
|
cfc0752 |
+ if (!cPluginManager::CallFirstService("MainMenuHooksPatch-v1.0::osSchedule", &menu))
|
|
|
cfc0752 |
+ menu = new cMenuSchedule;
|
|
|
cfc0752 |
+ else
|
|
|
cfc0752 |
+ state = osContinue;
|
|
|
cfc0752 |
+ break;
|
|
|
cfc0752 |
+ case osChannels:
|
|
|
cfc0752 |
+ if (!cPluginManager::CallFirstService("MainMenuHooksPatch-v1.0::osChannels", &menu))
|
|
|
cfc0752 |
+ menu = new cMenuChannels;
|
|
|
cfc0752 |
+ else
|
|
|
cfc0752 |
+ state = osContinue;
|
|
|
cfc0752 |
+ break;
|
|
|
cfc0752 |
+ case osTimers:
|
|
|
cfc0752 |
+ if (!cPluginManager::CallFirstService("MainMenuHooksPatch-v1.0::osTimers", &menu))
|
|
|
cfc0752 |
+ menu = new cMenuTimers;
|
|
|
cfc0752 |
+ else
|
|
|
cfc0752 |
+ state = osContinue;
|
|
|
cfc0752 |
+ break;
|
|
|
cfc0752 |
+ case osRecordings:
|
|
|
cfc0752 |
+ if (!cPluginManager::CallFirstService("MainMenuHooksPatch-v1.0::osRecordings", &menu))
|
|
|
cfc0752 |
+ menu = new cMenuRecordings;
|
|
|
cfc0752 |
+ else
|
|
|
cfc0752 |
+ state = osContinue;
|
|
|
cfc0752 |
+ break;
|
|
|
cfc0752 |
+ case osSetup: menu = new cMenuSetup; break;
|
|
|
cfc0752 |
+ case osCommands: menu = new cMenuCommands(tr("Commands"), &Commands); break;
|
|
|
cfc0752 |
case osStopRecord: if (Interface->Confirm(tr("Stop recording?"))) {
|
|
|
cfc0752 |
cOsdItem *item = Get(Current());
|
|
|
cfc0752 |
if (item) {
|
|
|
de1f536 |
@@ -3551,6 +3588,12 @@ eOSState cMenuMain::ProcessKey(eKeys Key
|
|
|
cfc0752 |
default: break;
|
|
|
cfc0752 |
}
|
|
|
cfc0752 |
}
|
|
|
cfc0752 |
+ if (menu) {
|
|
|
cfc0752 |
+ if (menu->IsMenu())
|
|
|
cfc0752 |
+ return AddSubMenu((cOsdMenu *) menu);
|
|
|
cfc0752 |
+ pluginOsdObject = menu;
|
|
|
cfc0752 |
+ return osPlugin;
|
|
|
cfc0752 |
+ }
|
|
|
cfc0752 |
if (!HasSubMenu() && Update(HadSubMenu))
|
|
|
cfc0752 |
Display();
|
|
|
cfc0752 |
if (Key != kNone) {
|