Update of /cvsroot/freevo/freevo/src/video
In directory sc8-pr-cvs1:/tmp/cvs-serv23676
Modified Files:
configure.py videoitem.py
Log Message:
Don't add 'Settings' with a submenu to the list of actions, add the
settings directly (max 4 items, mostly 1)
Index: configure.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/video/configure.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** configure.py 25 Jul 2003 20:54:29 -0000 1.12
--- configure.py 2 Aug 2003 10:09:52 -0000 1.13
***************
*** 10,13 ****
--- 10,17 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.13 2003/08/02 10:09:52 dischi
+ # Don't add 'Settings' with a submenu to the list of actions, add the
+ # settings directly (max 4 items, mostly 1)
+ #
# Revision 1.12 2003/07/25 20:54:29 dischi
# make audio selection work for files, too
***************
*** 53,56 ****
--- 57,61 ----
# The menu widget class
import menu
+ import plugin
# RegExp
***************
*** 135,144 ****
def toggle(arg=None, menuw=None):
! setattr(arg[0], arg[1], not getattr(arg[0], arg[1]))
! sel = menuw.all_items.index(menuw.menustack[-1].selected)
! menuw.menustack[-1].choices = main_menu_generate(arg[0])
! menuw.menustack[-1].selected = menuw.menustack[-1].choices[sel]
menuw.init_page()
--- 140,154 ----
def toggle(arg=None, menuw=None):
! setattr(arg[1], arg[2], not getattr(arg[1], arg[2]))
! old = menuw.menustack[-1].selected
! pos = menuw.menustack[-1].choices.index(menuw.menustack[-1].selected)
! new = add_toogle(arg[0], arg[1], arg[2])
! new.image = old.image
! new.display_type = old.display_type
!
! menuw.menustack[-1].choices[pos] = new
! menuw.menustack[-1].selected = menuw.menustack[-1].choices[pos]
menuw.init_page()
***************
*** 148,153 ****
def add_toogle(name, item, var):
if getattr(item, var):
! return menu.MenuItem("Turn off %s" % name, toggle, (item, var))
! return menu.MenuItem("Turn on %s" % name, toggle, (item, var))
--- 158,163 ----
def add_toogle(name, item, var):
if getattr(item, var):
! return menu.MenuItem("Turn off %s" % name, toggle, (name, item, var))
! return menu.MenuItem("Turn on %s" % name, toggle, (name, item, var))
***************
*** 156,179 ****
#
! def main_menu_generate(item):
next_start = 0
items = []
! if item.info.has_key('audio') and len(item.info['audio']) > 1:
! items.append(menu.MenuItem("Audio selection", audio_selection_menu, item))
! if item.info.has_key('subtitles') and len(item.info['subtitles']) > 1:
! items.append(menu.MenuItem("Subtitle selection", subtitle_selection_menu,
item))
! if item.info.has_key('chapters') and item.info['chapters'] > 1:
! items.append(menu.MenuItem("Chapter selection", chapter_selection_menu,
item))
! items += [ add_toogle('deinterlacing', item, 'deinterlace') ]
! items += [ menu.MenuItem("Play", play_movie, (item, '')) ]
return items
! def get_main_menu(item, menuw, xml_file):
global current_xml_file
current_xml_file = xml_file
! return menu.Menu('CONFIG MENU', main_menu_generate(item), xml_file=xml_file)
--- 166,192 ----
#
! def get_items(item):
next_start = 0
items = []
! if not ((not item.filename or item.filename == '0') and \
! item.mode == 'dvd' and plugin.getbyname(plugin.DVD_PLAYER)):
! if item.info.has_key('audio') and len(item.info['audio']) > 1:
! items.append(menu.MenuItem("Audio selection", audio_selection_menu,
item))
! if item.info.has_key('subtitles') and len(item.info['subtitles']) > 1:
! items.append(menu.MenuItem("Subtitle selection",
subtitle_selection_menu, item))
! if item.info.has_key('chapters') and item.info['chapters'] > 1:
! items.append(menu.MenuItem("Chapter selection", chapter_selection_menu,
item))
+ items += [ add_toogle('deinterlacing', item, 'deinterlace') ]
return items
! def get_menu(item, menuw, xml_file):
global current_xml_file
current_xml_file = xml_file
!
! items = get_items(item) + [ menu.MenuItem("Play", play_movie, (item, '')) ]
! return menu.Menu('CONFIG MENU', items, xml_file=xml_file)
Index: videoitem.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/video/videoitem.py,v
retrieving revision 1.68
retrieving revision 1.69
diff -C2 -d -r1.68 -r1.69
*** videoitem.py 29 Jul 2003 19:07:25 -0000 1.68
--- videoitem.py 2 Aug 2003 10:09:52 -0000 1.69
***************
*** 10,13 ****
--- 10,17 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.69 2003/08/02 10:09:52 dischi
+ # Don't add 'Settings' with a submenu to the list of actions, add the
+ # settings directly (max 4 items, mostly 1)
+ #
# Revision 1.68 2003/07/29 19:07:25 dischi
# cleanup and use VCD_PLAYER plugin if defined
***************
*** 357,385 ****
return a list of possible actions on this item.
"""
! items = [ (self.play, 'Play'), (self.settings, 'Change play settings') ]
! if self.filename and self.mode == 'file' and not self.media:
! items += [ (self.confirm_delete, 'Delete file') ]
!
! if self.variants:
! items = [ (self.show_variants, 'Show variants') ] + items
!
! # show DVD/VCD title menu for DVDs, but only when we aren't in a
! # submenu of a such a menu already
if not self.filename or self.filename == '0':
-
if self.mode == 'dvd':
- title_list = ( self.dvd_vcd_title_menu, 'DVD title list' )
if plugin.getbyname(plugin.DVD_PLAYER):
! items = [ items[0], title_list ] + items[1:]
else:
! items = [ title_list ] + items
!
! if self.mode == 'vcd':
! title_list = ( self.dvd_vcd_title_menu, 'VCD title list' )
if plugin.getbyname(plugin.VCD_PLAYER):
! items = [ items[0], title_list ] + items[1:]
else:
! items = [ title_list ] + items
for m in self.subitems:
# Allow user to watch one of the subitems instead of always both
--- 361,392 ----
return a list of possible actions on this item.
"""
! items = [ (self.play, 'Play'), ]
if not self.filename or self.filename == '0':
if self.mode == 'dvd':
if plugin.getbyname(plugin.DVD_PLAYER):
! items = [ (self.play, 'Play DVD'),
! ( self.dvd_vcd_title_menu, 'DVD title list' ) ]
else:
! items = [ ( self.dvd_vcd_title_menu, 'DVD title list' ),
! (self.play, 'Play default track') ]
!
! elif self.mode == 'vcd':
if plugin.getbyname(plugin.VCD_PLAYER):
! items = [ (self.play, 'Play VCD'),
! ( self.dvd_vcd_title_menu, 'VCD title list' ) ]
else:
! items = [ ( self.dvd_vcd_title_menu, 'VCD title list' ),
! (self.play, 'Play default track') ]
+
+ items += configure.get_items(self)
+
+ if self.filename and self.mode == 'file' and not self.media:
+ items += [ (self.confirm_delete, 'Delete file') ]
+
+ if self.variants:
+ items = [ (self.show_variants, 'Show variants') ] + items
+
+ if not self.filename or self.filename == '0':
for m in self.subitems:
# Allow user to watch one of the subitems instead of always both
***************
*** 390,394 ****
self.bookmarkfile = myfilename
items += [( self.bookmark_menu, 'Bookmarks')]
! # % (os.path.basename(m.filename)))]
else:
if os.path.exists(util.get_bookmarkfile(self.filename)):
--- 397,401 ----
self.bookmarkfile = myfilename
items += [( self.bookmark_menu, 'Bookmarks')]
!
else:
if os.path.exists(util.get_bookmarkfile(self.filename)):
***************
*** 639,643 ****
if not self.menuw:
self.menuw = menuw
! confmenu = configure.get_main_menu(self, self.menuw, self.xml_file)
self.menuw.pushmenu(confmenu)
--- 646,650 ----
if not self.menuw:
self.menuw = menuw
! confmenu = configure.get_menu(self, self.menuw, self.xml_file)
self.menuw.pushmenu(confmenu)
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog