Author: dmeyer
Date: Mon Jan 29 20:04:40 2007
New Revision: 9075
Modified:
trunk/ui/share/freevo_config.py
trunk/ui/src/config/__init__.py
trunk/ui/src/config/configfile.py
trunk/ui/src/gui/theme.py
trunk/ui/src/plugins/idlebar/weather.py
trunk/ui/src/video/database.py
trunk/ui/src/video/interface.py
trunk/ui/src/video/videoitem.py
Log:
More config cleanup. This is needed as first step before switching to
kaa.config. It removes some features that a) don't work as they should or
b) needed needed anymore or c) can be done outside freevo (umask).
Modified: trunk/ui/share/freevo_config.py
==============================================================================
--- trunk/ui/share/freevo_config.py (original)
+++ trunk/ui/share/freevo_config.py Mon Jan 29 20:04:40 2007
@@ -26,47 +26,6 @@
# -----------------------------------------------------------------------
-########################################################################
-# If you want to change some things for your personal setup, please
-# write this in a file called local_conf.py, see that file for more info.
-########################################################################
-
-# Version information for the two config files. When the major version
-# of the config file doesn't match, Freevo won't start. If the minor version
-# is different, there will be only a warning
-
-LOCAL_CONF_VERSION = 8.00
-
-# Description of changes in each new version
-FREEVO_CONF_CHANGES = [
- (2.0,
- '''Changed xmame_SDL to just xmame'''), ]
-
-LOCAL_CONF_CHANGES = [
- (8.00, '''Major config changes for 2.0. Please check freevo_config.py''' )
- ]
-
-# NOW check if freevo.conf is up-to-date. An older version may break the next
-# steps
-
-FREEVO_CONF_VERSION = setup.CONFIG_VERSION
-
-if int(str(CONF.version).split('.')[0]) != \
- int(str(FREEVO_CONF_VERSION).split('.')[0]):
- print "\nERROR: The version information in freevo_config.py does't"
- print 'match the version in %s.' % sysconfig.CONFIGFILE
- print 'please rerun "freevo setup" to generate a new freevo.conf'
- print_config_changes(FREEVO_CONF_VERSION, CONF.version,
- FREEVO_CONF_CHANGES)
- sys.exit(1)
-
-if int(str(CONF.version).split('.')[1]) != \
- int(str(FREEVO_CONF_VERSION).split('.')[1]):
- print 'WARNING: freevo_config.py was changed, please rerun "freevo setup"'
- print_config_changes(FREEVO_CONF_VERSION, CONF.version,
- FREEVO_CONF_CHANGES)
-
-
# ======================================================================
# General freevo settings:
# ======================================================================
@@ -117,21 +76,6 @@
DIRECTFB_MAP = input.DIRECTFB_MAP
#
-# Use Internet resources to fetch information?
-# For example, Freevo can use CDDB for album information,
-# the IMDB movie database for movie info, and Amazon for cover searches.
-# Set this to 0 if your computer isn't connected to a network.
-#
-USE_NETWORK = 1
-
-#
-# Umask setting for all files.
-# 022 means only the user has write access. If you share your Freevo
-# installation with different users, set this to 002
-#
-UMASK = 022
-
-#
# Suffix for playlist files
#
PLAYLIST_SUFFIX = [ 'm3u' ]
@@ -165,22 +109,9 @@
# mixer
plugin.activate('mixer')
-# add imdb search to the video item menu
-# BEACON_FIXME:
-# plugin.activate('video.imdb')
-
# delete file in menu
plugin.activate('file_ops', level=20)
-# use mplayer for video playpack
-# plugin.activate('video.mplayer')
-
-# use mplayer for tv
-# to use tvtime, put the following two lines in your local_conf.py:
-# plugin.remove('tv.mplayer')
-# plugin.activate('tv.tvtime')
-# plugin.activate('tv.xine')
-
# support for settings bookmarks (key RECORD) while playing. Also
# auto bookmarking when playback is stopped
plugin.activate('video.bookmarker', level=0)
@@ -199,19 +130,6 @@
# Freevo directory settings:
# ======================================================================
-# You can change all this variables in the folder.fxd on a per folder
-# basis
-#
-# Example:
-# <freevo>
-# <folder title="Title of the directory" img-cover="nice-cover.png">
-# <setvar name="directory_autoplay_single_item" val="0"/>
-# <info>
-# <content>A small description of the directory</content>
-# </info>
-# </folder>
-# </freevo>
-
#
# Should directories sorted by date instead of filename?
# 0 = No, always sort by filename.
@@ -263,19 +181,6 @@
DIRECTORY_USE_MEDIADB_NAMES = 1
#
-# The following settings determine which features are available for
-# which media types.
-#
-# If you set this variable in a folder.fxd, the value is 1 (enabled)
-# or 0 (disabled).
-#
-# Examples:
-# To enable autoplay for audio and image files:
-# DIRECTORY_AUTOPLAY_ITEMS = [ 'audio', 'image' ]
-# To disable autoplay entirely:
-# DIRECTORY_AUTOPLAY_ITEMS = []
-
-#
# Make all items a playlist. So when one is finished, the next one will
# start. It's also possible to browse through the list with UP and DOWN
#
@@ -319,14 +224,6 @@
VIDEO_ITEMS = None
#
-# Directory containing images for tv shows. A tv show maches the regular
-# expression VIDEO_SHOW_REGEXP, e.g. "Name 3x10 - Title". If an image
-# name.(png|jpg) (lowercase) is in this directory, it will be taken as cover
-# image
-#
-VIDEO_SHOW_DATA_DIR = None
-
-#
# The list of filename suffixes that are used to match the files that
# are played wih MPlayer.
#
@@ -496,8 +393,7 @@
#
# Output display to use. Possible values are SDL (using pygame),
-# Imlib2 (X only), fb (framebuffer) and Bmovl. The Bmovl displays also need
-# a background video set in GUI_BACKGROUND_VIDEO.
+# Imlib2 (X only) and fb (framebuffer).
#
GUI_DISPLAY = 'imlib2'
@@ -527,11 +423,6 @@
GUI_STOP_WHEN_PLAYING = 1
#
-# Video file for bmovl display
-#
-GUI_BACKGROUND_VIDEO = ''
-
-#
# Fade steps on application change.
#
GUI_FADE_STEPS = 10
@@ -540,8 +431,7 @@
# XML file for the skin. If GUI_XML_FILE is set, this skin will be
# used, otherwise the skin will rememeber the last choosen skin.
#
-GUI_XML_FILE = ''
-GUI_DEFAULT_XML_FILE = 'blurr'
+GUI_XML_FILE = 'blurr'
GUI_DFB_LAYER = 0
Modified: trunk/ui/src/config/__init__.py
==============================================================================
--- trunk/ui/src/config/__init__.py (original)
+++ trunk/ui/src/config/__init__.py Mon Jan 29 20:04:40 2007
@@ -169,9 +169,6 @@
#
execfile(os.path.join(os.path.dirname(__file__), 'configfile.py'))
-# set the umask
-os.umask(UMASK)
-
#
# force fullscreen when freevo is it's own windowmanager
#
Modified: trunk/ui/src/config/configfile.py
==============================================================================
--- trunk/ui/src/config/configfile.py (original)
+++ trunk/ui/src/config/configfile.py Mon Jan 29 20:04:40 2007
@@ -36,29 +36,6 @@
import sys
import freevo.conf
-def print_config_changes(conf_version, file_version, changelist):
- """
- print changes made between version on the screen
- """
- ver_old = float(file_version)
- ver_new = float(conf_version)
- if ver_old == ver_new:
- return
- print
- print 'You are using version %s, changes since then:' % file_version
- changed = [(cv, cd) for (cv, cd) in changelist if cv > ver_old]
- if not changed:
- print 'The changelist has not been updated'
- print 'Please notify the developers!'
- else:
- for change_ver, change_desc in changed:
- print 'Version %s:' % change_ver
- for line in change_desc.split('\n'):
- print ' ', line.strip()
- print
- print
-
-
#
# Config file handling
#
@@ -67,16 +44,6 @@
#
-# Check that freevo_config.py is not found in the config file dirs
-#
-for dirname in cfgfilepath[1:]:
- freevoconf = dirname + '/freevo_config.py'
- if os.path.isfile(freevoconf):
- log.critical(('freevo_config.py found in %s, please remove it ' +
- 'and use local_conf.py instead!') % freevoconf)
- sys.exit(1)
-
-#
# Load freevo_config.py:
#
FREEVO_CONFIG = os.path.join(freevo.conf.SHAREDIR, 'freevo_config.py')
@@ -108,45 +75,6 @@
if os.path.isfile(overridefile):
log.info('Loading cfg overrides: %s' % overridefile)
execfile(overridefile, globals(), locals())
-
- try:
- CONFIG_VERSION
- except NameError:
- print
- print 'Error: your local_config.py file has no version information'
- print 'Please check freevo_config.py for changes and set'
- print 'CONFIG_VERSION in %s to %s' % \
- (overridefile, LOCAL_CONF_VERSION)
- print
- sys.exit(1)
-
- if int(str(CONFIG_VERSION).split('.')[0]) < 5:
- print
- print 'Error: You local_conf.py is too old, too much has changed.'
- print 'Please check freevo_config.py for changes and set'
- print 'CONFIG_VERSION in %s to %s' % \
- (overridefile, LOCAL_CONF_VERSION)
- print
- sys.exit(1)
-
- if int(str(CONFIG_VERSION).split('.')[0]) != \
- int(str(LOCAL_CONF_VERSION).split('.')[0]):
- print
- print 'Error: The version information in freevo_config.py doesn\'t'
- print 'match the version in your local_config.py.'
- print 'Please check freevo_config.py for changes and set'
- print 'CONFIG_VERSION in %s to %s' % \
- (overridefile, LOCAL_CONF_VERSION)
- print_config_changes(LOCAL_CONF_VERSION, CONFIG_VERSION,
- LOCAL_CONF_CHANGES)
- sys.exit(1)
-
- if int(str(CONFIG_VERSION).split('.')[1]) != \
- int(str(LOCAL_CONF_VERSION).split('.')[1]):
- log.warning('freevo_config.py was changed.\n' +
- 'Please check your local_config.py')
- print_config_changes(LOCAL_CONF_VERSION, CONFIG_VERSION,
- LOCAL_CONF_CHANGES)
break
else:
Modified: trunk/ui/src/gui/theme.py
==============================================================================
--- trunk/ui/src/gui/theme.py (original)
+++ trunk/ui/src/gui/theme.py Mon Jan 29 20:04:40 2007
@@ -1450,8 +1450,6 @@
from the public functions at the top of this file
"""
global current_theme
- if not config.GUI_XML_FILE:
- config.GUI_XML_FILE = config.GUI_DEFAULT_XML_FILE
# load the fxd file at set current_theme
current_theme = set_base_fxd(config.GUI_XML_FILE)
current_theme.filename = config.GUI_XML_FILE
Modified: trunk/ui/src/plugins/idlebar/weather.py
==============================================================================
--- trunk/ui/src/plugins/idlebar/weather.py (original)
+++ trunk/ui/src/plugins/idlebar/weather.py Mon Jan 29 20:04:40 2007
@@ -56,10 +56,6 @@
You can also set the metric to True if you want metric units (celcius).
"""
def __init__(self, zone='GMXX0014', metric=False):
- if not config.USE_NETWORK:
- self.reason = 'Not using network, weather plugin disabled'
- return
-
IdleBarPlugin.__init__(self)
self.metric = metric
Modified: trunk/ui/src/video/database.py
==============================================================================
--- trunk/ui/src/video/database.py (original)
+++ trunk/ui/src/video/database.py Mon Jan 29 20:04:40 2007
@@ -80,10 +80,6 @@
# if os.path.isdir(discset2):
# listing = Listing(discset)
# files += listing.get('fxd')
- #
- # if config.VIDEO_SHOW_DATA_DIR:
- # listing = Listing(config.VIDEO_SHOW_DATA_DIR)
- # files += listing.get('fxd')
for info in fxditem.mimetype.parse(None, files, [], display_type='video'):
if info.type != 'video':
Modified: trunk/ui/src/video/interface.py
==============================================================================
--- trunk/ui/src/video/interface.py (original)
+++ trunk/ui/src/video/interface.py Mon Jan 29 20:04:40 2007
@@ -96,11 +96,6 @@
"""
set informations for a diritem based on the content, etc.
"""
- if not diritem.image and config.VIDEO_SHOW_DATA_DIR:
- base = os.path.basename(diritem.dir).lower()
- name = os.path.join(config.VIDEO_SHOW_DATA_DIR, base)
- diritem.image = util.getimage(name)
-
if database.tv_shows.has_key(os.path.basename(diritem.dir).lower()):
tvinfo = database.tv_shows[os.path.basename(diritem.dir).lower()]
diritem.info.set_variables(tvinfo[1])
Modified: trunk/ui/src/video/videoitem.py
==============================================================================
--- trunk/ui/src/video/videoitem.py (original)
+++ trunk/ui/src/video/videoitem.py Mon Jan 29 20:04:40 2007
@@ -116,13 +116,6 @@
# This matches a tv show with a show name, an epsiode and
# a title of the specific episode
sn = unicode_to_str(show_name[0].lower())
- if config.VIDEO_SHOW_DATA_DIR:
- image = util.getimage((config.VIDEO_SHOW_DATA_DIR + sn))
- if self.filename and not image:
- fname = os.path.dirname(self.filename)+'/'+ sn
- image = util.getimage(fname)
- if image:
- self.image = image
if database.tv_shows.has_key(sn):
tvinfo = database.tv_shows[sn]
self.info.set_variables(tvinfo[1])
-------------------------------------------------------------------------
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