Prefermenu patch (was: russian translation)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-------------- next part --------------
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;
 }

[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux