summaryrefslogtreecommitdiff
path: root/patches/.svn/text-base/vdr-1.6.0-altmenuaction.patch.svn-base
blob: 4b068500d8d217dab28abf7ad46a666968ce7868 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Index: plugin.h
===================================================================
--- plugin.h	(revision 2072)
+++ plugin.h	(working copy)
@@ -45,7 +45,8 @@
 
   virtual const char *MainMenuEntry(void);
   virtual cOsdObject *MainMenuAction(void);
-
+  virtual cOsdObject *AltMenuAction(void) { return NULL; };
+  
   virtual cMenuSetupPage *SetupMenu(void);
   virtual bool SetupParse(const char *Name, const char *Value);
   void SetupStore(const char *Name, const char *Value = NULL);
Index: vdr.c
===================================================================
--- vdr.c	(revision 2072)
+++ vdr.c	(working copy)
@@ -929,6 +929,19 @@
            Recordings.Update();
            DeletedRecordings.Update();
            }
+	cPlugin *mcliPlugin = cPluginManager::GetPlugin("mcli");
+	if (mcliPlugin) {
+		if (!ShutdownHandler.countdown) { // if kPower has been pressed, cMenuShutdown takes precedence over other menus
+			cOsdObject *MyMenu = mcliPlugin->AltMenuAction();
+			if (MyMenu) { // is there any cam-menu waiting?
+				DELETE_MENU;
+				if (cControl::Control())
+					cControl::Control()->Hide();
+				Menu = MyMenu;
+				Menu->Show();
+			}
+		}
+	}
         // CAM control:
         if (!Menu && !cOsd::IsOpen())
            Menu = CamControl();