From 96ebdbf4b1e495d44f8f837068af7c2d925bab62 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 1 Dec 2002 18:00:00 +0100 Subject: Version 1.1.18 - Fixed missing initialization of 'number' in cChannel (thanks to Martin Hammerschmid for reporting this one). - Fixed a misplaced ')' in the fix about the stale lock files (thanks again to Oliver Endriss for pointing this out - it was my fault). - Group delimiters in the 'channels.conf' file that have no text (like a simple ":" or ":@201") no longer show up in the Channels menu (suggested by Guy Roussin). - Added "Tele 5" to 'channels.conf' (thanks to Georg Hitsch). - Changed the source directory name for plugins from 'SRC' to 'src' (suggested by Clemens Kirchgatterer). - Removed transponders 10788, 11739 and 12266 from 'channels.conf' (apparently they are no longer active). - Deactivated some templates in tools.h in case some plugin needs to use the STL (suggested by Gerald Berwolf). - Timers now accept channel IDs even if the 'source' is 0 (thanks to Stefan Huelswitt for reporting this one). - Now taking an active SVDRP connection into account when doing shutdown or housekeeping (suggested by Emil Naepflein). - Macros in 'keymacros.conf' can now use "@plugin" to directly access the main menu function of a given plugin (see man vdr(5) for details). - The new plugin 'sky' can be used to integrate a Sky Digibox into the VDR system, using a Kfir MPEG2 encoder card (see PLUGINS/src/sky/README for details). --- menu.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'menu.c') diff --git a/menu.c b/menu.c index 0210e2d..a1c136f 100644 --- a/menu.c +++ b/menu.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menu.c 1.226 2002/11/24 14:34:41 kls Exp $ + * $Id: menu.c 1.228 2002/12/01 10:31:55 kls Exp $ */ #include "menu.h" @@ -684,15 +684,10 @@ public: cMenuChannels::cMenuChannels(void) :cOsdMenu(tr("Channels"), CHNUMWIDTH) { - //TODO - int i = 0; - cChannel *channel; - int curr = ((channel = Channels.GetByNumber(cDevice::CurrentChannel())) != NULL) ? channel->Index() : -1; - - while ((channel = Channels.Get(i)) != NULL) { - Add(new cMenuChannelItem(channel), i == curr); - i++; - } + for (cChannel *channel = Channels.First(); channel; channel = Channels.Next(channel)) { + if (!channel->GroupSep() || *channel->Name()) + Add(new cMenuChannelItem(channel), channel->Number() == cDevice::CurrentChannel()); + } SetHelp(tr("Edit"), tr("New"), tr("Delete"), tr("Mark")); } @@ -2183,11 +2178,11 @@ cMenuPluginItem::cMenuPluginItem(const char *Name, int Index) cOsdObject *cMenuMain::pluginOsdObject = NULL; -cMenuMain::cMenuMain(bool Replaying, eOSState State) +cMenuMain::cMenuMain(bool Replaying, eOSState State, const char *Plugin) :cOsdMenu("") { replaying = Replaying; - Set(); + Set(Plugin); // Initial submenus: @@ -2198,6 +2193,7 @@ cMenuMain::cMenuMain(bool Replaying, eOSState State) case osRecordings: AddSubMenu(new cMenuRecordings(NULL, 0, true)); break; case osSetup: AddSubMenu(new cMenuSetup); break; case osCommands: AddSubMenu(new cMenuCommands(tr("Commands"), &Commands)); break; + case osPlugin: break; // the actual work is done in Set() default: break; } } @@ -2209,7 +2205,7 @@ cOsdObject *cMenuMain::PluginOsdObject(void) return o; } -void cMenuMain::Set(void) +void cMenuMain::Set(const char *Plugin) { Clear(); //SetTitle("VDR"); // this is done below, including disk usage @@ -2242,7 +2238,7 @@ void cMenuMain::Set(void) if (p) { const char *item = p->MainMenuEntry(); if (item) - Add(new cMenuPluginItem(hk(item), i)); + Add(new cMenuPluginItem(hk(item), i), Plugin && strcmp(Plugin, p->Name()) == 0); } else break; -- cgit v1.2.3