Skip to content

Commit 71cdf1f

Browse files
committed
move OSD menu from main menu to plugin setup menu
1 parent 59cb96c commit 71cdf1f

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

dynamite.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
#include "menu.h"
1111
#include "monitor.h"
1212

13-
static const char *VERSION = "0.0.6a";
13+
static const char *VERSION = "0.0.6b";
1414
static const char *DESCRIPTION = "attach/detach devices on the fly";
15-
static const char *MAINMENUENTRY = "dynamite";
15+
static const char *MAINMENUENTRY = NULL;
1616

1717
class cDynamiteDvbDeviceProbe : public cDvbDeviceProbe {
1818
private:
@@ -240,13 +240,13 @@ time_t cPluginDynamite::WakeupTime(void)
240240
cOsdObject *cPluginDynamite::MainMenuAction(void)
241241
{
242242
// Perform the action when selected from the main VDR menu.
243-
return new cDynamiteMainMenu;
243+
return NULL;
244244
}
245245

246246
cMenuSetupPage *cPluginDynamite::SetupMenu(void)
247247
{
248248
// Return a setup menu in case the plugin supports one.
249-
return NULL;
249+
return new cDynamiteMainMenu;
250250
}
251251

252252
bool cPluginDynamite::SetupParse(const char *Name, const char *Value)

menu.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ class cDynamiteMenuItem : public cOsdItem
8181
};
8282

8383
cDynamiteMainMenu::cDynamiteMainMenu(void)
84-
:cOsdMenu("dynamite")
8584
{
8685
Add(new cDynamiteMenuItem(maList, "list attached devices"));
8786
Add(new cDynamiteMenuItem(maScan, "scan for new DVB devices", false));
@@ -95,6 +94,10 @@ cDynamiteMainMenu::~cDynamiteMainMenu(void)
9594
{
9695
}
9796

97+
void cDynamiteMainMenu::Store(void)
98+
{
99+
}
100+
98101
eOSState cDynamiteMainMenu::ProcessKey(eKeys Key)
99102
{
100103
cDynamiteMenuItem *item = dynamic_cast<cDynamiteMenuItem*>(Get(Current()));

menu.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
#ifndef __DYNAMITEMENU_H
22
#define __DYNAMITEMENU_H
33

4-
#include <vdr/osdbase.h>
4+
#include <vdr/menuitems.h>
55

66

7-
class cDynamiteMainMenu : public cOsdMenu
7+
class cDynamiteMainMenu : public cMenuSetupPage
88
{
99
private:
1010

1111
protected:
12+
virtual void Store(void);
1213

1314
public:
1415
cDynamiteMainMenu(void);

0 commit comments

Comments
 (0)