Pascal Schirrmann schrieb:
the "old" behavior of the OK key has been to open the submenu,
it is not a big thing to change that back.
I will send a patch tomorrow!
Maybe, then I probably had only one item in my menu, witch was 'plying TV' :-)

I checked that again, and you are right, the old behaviour has been to play or to show the menu, when the selected program starts in the future.

Still I think, that opening the menu is a better thing to do, when a user presses SELECT, and start playing when he/she presses PLAY. With the patch I attached to this mail, there is now a option for 'play' in the submenu, when the selected program is running at the moment.

Please test, and let me know if this is a good solution.


Regards
Tanja
Index: freevo/src/tv/program_display.py
===================================================================
--- freevo/src/tv/program_display.py	(Revision 9222)
+++ freevo/src/tv/program_display.py	(Arbeitskopie)
@@ -33,6 +33,7 @@
 import time, traceback
 from time import gmtime, strftime
 
+import rc
 import plugin, config, menu, string
 import osd
 
@@ -107,6 +108,7 @@
         """ creates the submenu for a programm
 
         Entries of this menu:
+            0.) 'Play, if this programm is currently running'
             1.) 'Schedule for recording' OR 'Remove from schedule'
             2.) 'Search for more of this program'
             3.) 'Add to favorites' OR 'Remove from favorites'
@@ -116,13 +118,16 @@
 
         #list of entries for the menu
         items = []
+        
+        ## 0.) 'Play', if this programm is currently running
+        # check the time     
+        now = time.time() + (7*60)
+        if self.prog.start <= now:
+            items.append(menu.MenuItem(_('Play'), action= self.play_program))
      
-       
+               
         ## 1.) 'Schedule for recording' OR 'Remove from schedule'
         # check if this program is scheduled
-
-        ## 1.) 'Schedule for recording' OR 'Remove from schedule'
-        # check if this program is scheduled
         (got_schedule, schedule) = record_client.getScheduledRecordings()
         if got_schedule:
             (result, message) = record_client.isProgScheduled(self.prog,
@@ -168,7 +173,12 @@
 
 
     ### Actions:
+    def play_program(self, arg=None, menuw=None):
+        """ Play """
+        menuw.delete_menu()
+        rc.post_event('PLAY')     
     
+    
     def schedule_program(self, arg=None, menuw=None):
         """ 
         add a program to schedule
Index: freevo/src/tv/tvguide.py
===================================================================
--- freevo/src/tv/tvguide.py	(Revision 9222)
+++ freevo/src/tv/tvguide.py	(Arbeitskopie)
@@ -139,7 +139,7 @@
         MENU_PAGEUP: Moves to the first of the currently displayed channels
         MENU_PAGEDOWN: Move to the last of the currently displayed channels
         MENU_SUBMENU: Open a submenu for the selected program
-        MENU_SELECT: Execute the first entry in the submenu
+        MENU_SELECT: Open a submenu for the selected program
         TV_START_RECORDING: Start to record this or put it on schedule
         PLAY: Start to watch the selected channel (if it is possible)
         PLAY_END: Show the guide again
@@ -147,7 +147,7 @@
         """
 
 
-        _debug_('TVGUIDE EVENT is %s' % event, 2)
+        _debug_('TVGUIDE EVENT is %s' % event, 0)
 
         ## MENU_CHANGE_STYLE
         if event == MENU_CHANGE_STYLE:
@@ -216,7 +216,7 @@
 
         ## MENU_SELECT: Open a submenu for the selected program
         elif event == MENU_SELECT:
-            self.event_record()
+            self.event_submenu()
 
         ## TV_START_RECORDING: Start to record this or put it on schedule
         elif event == TV_START_RECORDING:
Index: freevo/src/tv/tvmenu.py
===================================================================
--- freevo/src/tv/tvmenu.py	(Revision 9222)
+++ freevo/src/tv/tvmenu.py	(Arbeitskopie)
@@ -37,10 +37,6 @@
 # The menu widget class
 import menu
 
-# The RemoteControl class, sets up a UDP daemon that the remote control client
-# sends commands to
-import rc
-
 import plugin
 
 import util.tv_util as tv_util
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-devel mailing list
Freevo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to