From patchwork Sun Apr 16 21:23:42 2006 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Steinel X-Patchwork-Id: 12258 Received: from mailout01.sul.t-online.com ([194.25.134.80]) by www.linuxtv.org with esmtp (Exim 4.50) id 1FVEkW-0006oc-Oy for vdr@linuxtv.org; Sun, 16 Apr 2006 23:25:40 +0200 Received: from fwd29.aul.t-online.de by mailout01.sul.t-online.com with smtp id 1FVEkF-0005s4-01; Sun, 16 Apr 2006 23:25:23 +0200 Received: from babylon.flonet.net (XLRT0TZfgeNhKuYSL1MpPYbOJ1iMouCiZpp9c0l07vKnO1whsKwZYc@[217.251.191.75]) by fwd29.sul.t-online.de with esmtp id 1FVEkB-0LgO6i0; Sun, 16 Apr 2006 23:25:19 +0200 Received: from [192.168.18.50] (allmeister.flonet.net [192.168.18.50]) by babylon.flonet.net (Postfix) with ESMTP id A578D424077; Sun, 16 Apr 2006 23:24:27 +0200 (CEST) Message-ID: <4442B5DE.70205@linuxtv.org> Date: Sun, 16 Apr 2006 23:23:42 +0200 From: Florian.Steinel@t-online.de (Florian Steinel) User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: VDR Mailing List , Monchenko Vladimir Subject: [vdr] Prefermenu patch (was: russian translation) References: <44291487.6090502@globall.ru> In-Reply-To: <44291487.6090502@globall.ru> X-ID: XLRT0TZfgeNhKuYSL1MpPYbOJ1iMouCiZpp9c0l07vKnO1whsKwZYc X-TOI-MSGID: 8bfa4c9e-90a2-49e7-ba25-1ee7c9eab78e X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Apr 2006 21:25:40 -0000 Status: O X-Status: X-Keywords: X-UID: 8867 Monchenko Vladimir schrieb: > It is very good > plugin, but in my opinion it has one lack: casual pressing can lead to > erroneous removal or moving of channels. My small daughter sometimes > does it :) . It will be more convenient if to add function of editing > prefermenu in plugin setup, and on hot button to leave only a mode of > switching of channels. Hope this helps. Best regards, Florian Steinel diff -Nur prefermenu-0.6.4/prefermenu.c prefermenu-0.6.4a/prefermenu.c --- prefermenu-0.6.4/prefermenu.c Tue Jan 11 20:09:40 2005 +++ prefermenu-0.6.4a/prefermenu.c Sun Sep 11 21:38:07 2005 @@ -51,6 +51,21 @@ // Start any background activities the plugin shall perform. RegisterI18n(Phrases); // Default values for setup + // Perform the action when selected from the main VDR menu. + // Load prefered channels list + if(!PreferedChannelsList.Load(AddDirectory(ConfigDirectory(),"prefermenu.conf"))) { + // File load failed + isyslog("prefermenu.conf file not found"); + } + // Create the "displayed" channel list (which can be sorted) + if(!PreferedChannelsListDisplay.Load(AddDirectory(ConfigDirectory(),"prefermenu.conf"))) { + // Saving after loading allows to clean the file + // File load failed + // But just log once + } else { + // Clean up the file with current VDR channels.conf + PreferedChannelsList.Save(); + } return true; } @@ -61,20 +76,12 @@ cOsdObject *cPluginPrefermenu::MainMenuAction(void) { - // Perform the action when selected from the main VDR menu. - // Load prefered channels list - if(!PreferedChannelsList.Load(AddDirectory(ConfigDirectory(),"prefermenu.conf"))) { - // File load failed - isyslog("prefermenu.conf file not found"); - } // Create the "displayed" channel list (which can be sorted) if(!PreferedChannelsListDisplay.Load(AddDirectory(ConfigDirectory(),"prefermenu.conf"))) { // Saving after loading allows to clean the file // File load failed // But just log once } - // Clean up the file with current VDR channels.conf - PreferedChannelsList.Save(); config.height= (config.lines * (LINEHEIGHT+BORDERSIZE+2))+BORDERSIZE; return new cPreferOsd; }