Author: dmeyer
Date: Fri Feb 2 20:28:56 2007
New Revision: 9131
Removed:
trunk/ui/src/setup.py
Modified:
trunk/ui/bin/freevo
trunk/ui/share/freevo_config.py
trunk/ui/src/config.py
trunk/ui/src/gui/displays/fb.py
Log:
remove the need for freevo.conf
Modified: trunk/ui/bin/freevo
==============================================================================
--- trunk/ui/bin/freevo (original)
+++ trunk/ui/bin/freevo Fri Feb 2 20:28:56 2007
@@ -76,10 +76,6 @@
print
sys.exit(1)
-if len(sys.argv) >= 2 and sys.argv[1] in ('setup'):
- import freevo.ui.setup
- freevo.ui.setup.run_as_main()
-
try:
# i18n support
Modified: trunk/ui/share/freevo_config.py
==============================================================================
--- trunk/ui/share/freevo_config.py (original)
+++ trunk/ui/share/freevo_config.py Fri Feb 2 20:28:56 2007
@@ -350,16 +350,18 @@
#
GUI_DISPLAY = 'imlib2'
-# Some special settings for the different displays
-if CONF.display == 'mga':
- GUI_OVERSCAN_X = 20
- GUI_OVERSCAN_Y = 10
- GUI_DISPLAY = 'fb'
-
-if CONF.display in ( 'directfb', 'dfbmga' ):
- GUI_OVERSCAN_X = 50
- GUI_OVERSCAN_Y = 50
- GUI_DISPLAY = 'sdl'
+#
+# Special settings for fb display
+#
+GUI_DISPLAY_FB_NORM = 'pal' # pal or ntsc
+GUI_DISPLAY_FB_MODE = '' # set to 'mga' for special G400 support
+
+#
+# Window / Display size
+#
+GUI_WIDTH = 800
+GUI_HEIGHT = 600
+
#
# Fade steps on application change.
Modified: trunk/ui/src/config.py
==============================================================================
--- trunk/ui/src/config.py (original)
+++ trunk/ui/src/config.py Fri Feb 2 20:28:56 2007
@@ -64,41 +64,6 @@
# get logging object
log = logging.getLogger('config')
-#
-# freevo.conf parser
-#
-
-class struct(object):
- pass
-
-CONF = struct()
-CONF.geometry = '800x600'
-CONF.display = 'x11'
-CONF.tv = 'ntsc'
-CONF.version = 0
-
-for dirname in freevo.conf.cfgfilepath:
- conffile = os.path.join(dirname, 'freevo.conf')
- if os.path.isfile(conffile):
- c = open(conffile)
- for line in c.readlines():
- if line.startswith('#'):
- continue
- if line.find('=') == -1:
- continue
- vals = line.strip().split('=')
- if not len(vals) == 2:
- print 'invalid config entry: %s' % line
- continue
- name, val = vals[0].strip(), vals[1].strip()
- CONF.__dict__[name] = val
-
- c.close()
- break
-else:
- log.critical('freevo.conf not found, please run \'freevo setup\'')
- sys.exit(1)
-
kaa.popcorn.config.load('/etc/freevo/player.conf')
# if started as user add personal config file
if os.getuid() > 0:
@@ -108,9 +73,6 @@
# save the file again in case it did not exist or the variables changed
kaa.popcorn.config.save()
-w, h = CONF.geometry.split('x')
-GUI_WIDTH, GUI_HEIGHT = int(w), int(h)
-
#
# Read the environment set by the start script
#
Modified: trunk/ui/src/gui/displays/fb.py
==============================================================================
--- trunk/ui/src/gui/displays/fb.py (original)
+++ trunk/ui/src/gui/displays/fb.py Fri Feb 2 20:28:56 2007
@@ -51,18 +51,18 @@
Display class for framebuffer output
"""
def __init__(self, size, default=False):
- if config.CONF.display == 'mga':
+ if config.GUI_DISPLAY_FB_MODE == 'mga':
# switch heads
os.system('matroxset -f /dev/fb1 -m 0')
os.system('matroxset -f /dev/fb0 -m 3')
- if config.CONF.tv == 'pal':
+ if config.GUI_DISPLAY_FB_NORM == 'pal':
# switch to PAL
os.system('matroxset 1')
else:
# switch to NTSC
os.system('matroxset -f /dev/fb0 2 2')
# activate framebuffer with tv norm
- FramebufferCanvas.__init__(self, size, config.CONF.tv)
+ FramebufferCanvas.__init__(self, size, config.GUI_DISPLAY_FB_NORM)
else:
# activate framebuffer without changing the resolution
@@ -80,7 +80,7 @@
Stop the display
"""
if Base.stop(self):
- if config.CONF.display == 'mga':
+ if config.GUI_DISPLAY_FB_MODE == 'mga':
# switch heads back
os.system('matroxset -f /dev/fb0 -m 1')
os.system('matroxset -f /dev/fb1 -m 0')
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog