Author: dmeyer
Date: Mon Jan 29 19:38:47 2007
New Revision: 9072
Modified:
trunk/ui/share/freevo_config.py
trunk/ui/src/gui/areas/handler.py
trunk/ui/src/mainmenu.py
trunk/ui/src/plugins/mediamenu.py
Log:
remove unneeded code
Modified: trunk/ui/share/freevo_config.py
==============================================================================
--- trunk/ui/share/freevo_config.py (original)
+++ trunk/ui/share/freevo_config.py Mon Jan 29 19:38:47 2007
@@ -551,23 +551,6 @@
GUI_XML_FILE = ''
GUI_DEFAULT_XML_FILE = 'blurr'
-#
-# Select a way when to switch to text view even if a image menu is there
-#
-# 1 = Force text view when all items have the same image and there are no
-# directories
-# 2 = Ignore the directories, always switch to text view when all images
-# are the same
-#
-GUI_FORCE_TEXTVIEW_STYLE = 1
-
-#
-# Force text view for the media menu
-# (The media menu is the first menu displayed for video, audio, images
-# and games).
-#
-GUI_MEDIAMENU_FORCE_TEXTVIEW = 0
-
GUI_DFB_LAYER = 0
# start GUI in fullscreen mode
Modified: trunk/ui/src/gui/areas/handler.py
==============================================================================
--- trunk/ui/src/gui/areas/handler.py (original)
+++ trunk/ui/src/gui/areas/handler.py Mon Jan 29 19:38:47 2007
@@ -176,8 +176,7 @@
pass
for i in menu.choices:
- if config.GUI_FORCE_TEXTVIEW_STYLE == 1 and \
- i.type == 'dir':
+ if i.type == 'dir':
# directory with few items and folder:
self.use_text_view = False
return
@@ -196,7 +195,7 @@
if i.type == 'dir':
folder += 1
# directory with mostly folder:
- if config.GUI_FORCE_TEXTVIEW_STYLE == 1 and folder > 3:
+ if folder > 3:
self.use_text_view = False
return
Modified: trunk/ui/src/mainmenu.py
==============================================================================
--- trunk/ui/src/mainmenu.py (original)
+++ trunk/ui/src/mainmenu.py Mon Jan 29 19:38:47 2007
@@ -63,8 +63,6 @@
self.image = image
self.type = type
self.function = action, arg
- self.args = []
- self.kwargs = {}
if not type and not parent.parent:
# this is the first page, force type to 'main'
@@ -74,9 +72,8 @@
return
# load extra informations for the skin fxd file
- theme = gui.theme.get()
+ theme = gui.theme.get()
skin_info = theme.mainmenu.items
- imagedir = theme.mainmenu.imagedir
if skin_info.has_key(skin_type):
skin_info = skin_info[skin_type]
self.name = _(skin_info.name)
@@ -84,26 +81,17 @@
if skin_info.icon:
self.icon = os.path.join(theme.icon_dir, skin_info.icon)
+ imagedir = theme.mainmenu.imagedir
if not self.image and imagedir:
# find a nice image based on skin type
self.image = util.getimage(os.path.join(imagedir, skin_type))
- def parameter(self, *args, **kwargs):
- """
- Set parameter for the function call.
- """
- self.args = args
- self.kwargs = kwargs
-
-
def actions(self):
"""
Actions for this item.
"""
- a = Action(self.name, self.function[0])
- a.parameter(*self.args, **self.kwargs)
- return [ a ]
+ return [ Action(self.name, self.function[0]) ]
class MainMenu(Item):
@@ -124,30 +112,6 @@
self.menuw = MenuWidget(menu)
- def get_skins(self):
- """
- return a list of all possible skins with name, image and filename
- """
- ret = []
- skindir = os.path.join(config.SKIN_DIR, 'main')
- skin_files = util.match_files(skindir, ['fxd'])
-
- # image is not usable stand alone
- skin_files.remove(os.path.join(config.SKIN_DIR, 'main/image.fxd'))
- skin_files.remove(os.path.join(config.SKIN_DIR, 'main/basic.fxd'))
-
- for skin in skin_files:
- name = os.path.splitext(os.path.basename(skin))[0]
- if os.path.isfile('%s.png' % os.path.splitext(skin)[0]):
- image = '%s.png' % os.path.splitext(skin)[0]
- elif os.path.isfile('%s.jpg' % os.path.splitext(skin)[0]):
- image = '%s.jpg' % os.path.splitext(skin)[0]
- else:
- image = None
- ret += [ ( name, image, skin ) ]
- return ret
-
-
def get_menustack(self):
"""
Get the menustack. This item needs to override this function
Modified: trunk/ui/src/plugins/mediamenu.py
==============================================================================
--- trunk/ui/src/plugins/mediamenu.py (original)
+++ trunk/ui/src/plugins/mediamenu.py Mon Jan 29 19:38:47 2007
@@ -65,10 +65,9 @@
plugin.MainMenuPlugin.__init__(self)
self.name = name
self.type = type
- self.ftv = config.GUI_MEDIAMENU_FORCE_TEXTVIEW
def items(self, parent):
- return [ MediaMenu(parent, self.name, self.type, self.ftv) ]
+ return [ MediaMenu(parent, self.name, self.type) ]
@@ -78,10 +77,10 @@
directories and the ROM_DRIVES
"""
- def __init__(self, parent, title, type, force_text_view):
+ def __init__(self, parent, title, type):
MainMenuItem.__init__(self, '', self.main_menu, type='main',
parent=parent, skin_type=type)
- self.force_text_view = force_text_view
+ self.force_text_view = False
self.display_type = type
self.item_menu = None
-------------------------------------------------------------------------
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-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog