Author: dmeyer
Date: Fri Jan 26 15:39:10 2007
New Revision: 9059
Modified:
trunk/ui/src/audio/__init__.py
trunk/ui/src/audio/audiodiskitem.py
trunk/ui/src/audio/audioitem.py
trunk/ui/src/audio/fxdhandler.py
trunk/ui/src/audio/interface.py
trunk/ui/src/audio/player.py
trunk/ui/src/audio/plugins/artist.py
trunk/ui/src/beacon.py
trunk/ui/src/directory.py
trunk/ui/src/event.py
trunk/ui/src/image/__init__.py
trunk/ui/src/image/fxdhandler.py
trunk/ui/src/image/imageitem.py
trunk/ui/src/image/interface.py
trunk/ui/src/image/plugins/apod.py
trunk/ui/src/image/viewer.py
trunk/ui/src/mainmenu.py
trunk/ui/src/playlist.py
trunk/ui/src/plugin.py
trunk/ui/src/plugin_loader.py
Log:
Header cleanup (Part I)
Modified: trunk/ui/src/audio/__init__.py
==============================================================================
--- trunk/ui/src/audio/__init__.py (original)
+++ trunk/ui/src/audio/__init__.py Fri Jan 26 15:39:10 2007
@@ -4,17 +4,17 @@
# -----------------------------------------------------------------------------
# $Id$
#
-# This file imports everything needed to use this audio module.
-# There is only one class provided for audio files, the PluginInterface
-# from interface.py. It is a MimetypePlugin that can be accessed
-# from plugin.mimetype(). It will also register an fxd handler for the
+# This file imports everything needed to use this audio module. There
+# is only one class provided for audio files, the PluginInterface from
+# interface.py. It is a MimetypePlugin that can be accessed from
+# plugin.mimetype(). It will also register an fxd handler for the
# <playlist> tag.
#
# Audio plugins are also allowed to use AudioItem to create a new AudioItem
#
# -----------------------------------------------------------------------------
# Freevo - A Home Theater PC framework
-# Copyright (C) 2002-2007 Krister Lagerstrom, Dirk Meyer, et al.
+# Copyright (C) 2002 Krister Lagerstrom, 2003-2007 Dirk Meyer, et al.
#
# First Edition: Dirk Meyer <[EMAIL PROTECTED]>
# Maintainer: Dirk Meyer <[EMAIL PROTECTED]>
Modified: trunk/ui/src/audio/audiodiskitem.py
==============================================================================
--- trunk/ui/src/audio/audiodiskitem.py (original)
+++ trunk/ui/src/audio/audiodiskitem.py Fri Jan 26 15:39:10 2007
@@ -4,16 +4,16 @@
# -----------------------------------------------------------------------------
# $Id$
#
-# This file handles and item for an audio cd. When selected it will either
-# play the whole disc or show a menu with all items.
+# This file handles and item for an audio cd. When selected it will
+# either play the whole disc or show a menu with all items.
#
# -----------------------------------------------------------------------------
# Freevo - A Home Theater PC framework
-# Copyright (C) 2002-2005 Krister Lagerstrom, Dirk Meyer, et al.
+# Copyright (C) 2002 Krister Lagerstrom, 2003-2006 Dirk Meyer, et al.
#
# Maintainer: Dirk Meyer <[EMAIL PROTECTED]>
#
-# Please see the file doc/CREDITS for a complete list of authors.
+# Please see the file AUTHORS for a complete list of authors.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -31,7 +31,6 @@
#
# -----------------------------------------------------------------------------
-
__all__ = [ 'AudioDiskItem' ]
# Python imports
@@ -55,7 +54,7 @@
self.type = 'audiocd'
self.info = device
self.name = device.get('title')
-
+
# variables only for Playlist
self.autoplay = 0
@@ -66,7 +65,7 @@
"""
return [ Action(_('Browse disc'), self.browse ) ]
-
+
def browse(self):
"""
Make a menu item for each file in the directory
@@ -96,6 +95,6 @@
# d = DirItem(self.mountdir, self)
# d.name = _('Data files on disc')
# items.append(d)
-
+
item_menu = Menu(self.name, items, type = self.display_type)
self.pushmenu(item_menu)
Modified: trunk/ui/src/audio/audioitem.py
==============================================================================
--- trunk/ui/src/audio/audioitem.py (original)
+++ trunk/ui/src/audio/audioitem.py Fri Jan 26 15:39:10 2007
@@ -1,19 +1,20 @@
# -*- coding: iso-8859-1 -*-
-# -----------------------------------------------------------------------
+# -----------------------------------------------------------------------------
# audioitem - Item for mp3 and ogg files
-# -----------------------------------------------------------------------
+# -----------------------------------------------------------------------------
# $Id$
#
# This file contains an item used for audio files. It handles all actions
-# possible for an audio item (right now only 'play')
+# possible for an audio item
#
-# Notes:
-# Todo:
-#
-# -----------------------------------------------------------------------
+# -----------------------------------------------------------------------------
# Freevo - A Home Theater PC framework
-# Copyright (C) 2002-2005 Krister Lagerstrom, Dirk Meyer, et al.
-# Please see the file doc/CREDITS for a complete list of authors.
+# Copyright (C) 2002 Krister Lagerstrom, 2003-2007 Dirk Meyer, et al.
+#
+# First Edition: Dirk Meyer <[EMAIL PROTECTED]>
+# Maintainer: Dirk Meyer <[EMAIL PROTECTED]>
+#
+# Please see the file AUTHORS for a complete list of authors.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -29,25 +30,25 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# ----------------------------------------------------------------------- */
+# -----------------------------------------------------------------------------
__all__ = [ 'AudioItem' ]
-# Python imports
+# python imports
import os
-import re
+import logging
# kaa imports
from kaa.strutils import str_to_unicode
-# Freevo imports
-import config
+# freevo imports
from menu import MediaItem, Action
from event import *
+# audio player
import player as audioplayer
-import logging
+# get logging object
log = logging.getLogger('audio')
class AudioItem(MediaItem):
@@ -65,7 +66,7 @@
self.length = int(self.info['length'])
except:
self.length = 0
-
+
def sort(self, mode=None):
"""
@@ -81,7 +82,8 @@
return '%s %0.3i-%s' % (self['discs'], int(self['trackno']),
str_to_unicode(self.url))
except ValueError:
- return '%s-%s' % (unicode(self['trackno']),
str_to_unicode(self.url))
+ return '%s-%s' % (unicode(self['trackno']),
+ str_to_unicode(self.url))
return str_to_unicode(self.url)
@@ -111,10 +113,10 @@
if key == 'elapsed':
return '%d:%02d' % (int(self.elapsed / 60), int(self.elapsed % 60))
-
+
return MediaItem.__getitem__(self, key)
-
+
def actions(self):
"""
return a list of possible actions on this item
Modified: trunk/ui/src/audio/fxdhandler.py
==============================================================================
--- trunk/ui/src/audio/fxdhandler.py (original)
+++ trunk/ui/src/audio/fxdhandler.py Fri Jan 26 15:39:10 2007
@@ -1,7 +1,7 @@
# -*- coding: iso-8859-1 -*-
-# -----------------------------------------------------------------------
+# -----------------------------------------------------------------------------
# fxdhandler - handler for <audio> tags in a fxd file
-# -----------------------------------------------------------------------
+# -----------------------------------------------------------------------------
# $Id$
#
# This file contains the parser for the <audio> tag
@@ -15,29 +15,29 @@
# <playlist/>
# <reconnect/>
# <url>http://64.236.34.141:80/stream/1005</url>
-#
+#
# <info>
# <genre>JAZZ</genre>
# <description>A nice description</description>
# </info>
-#
+#
# </audio>
# </freevo>
-#
+#
# Everything except title and url is optional. If <player> is set,
# this player will be used (possible xine or mplayer). The tag
# <playlist/> signals that this url is a playlist (mplayer needs that).
# <reconnect/> sihnals that the player should reconnect when the
# connection stopps.
-#
#
-# Notes:
-# Todo:
-#
-# -----------------------------------------------------------------------
+# -----------------------------------------------------------------------------
# Freevo - A Home Theater PC framework
-# Copyright (C) 2002-2005 Krister Lagerstrom, Dirk Meyer, et al.
-# Please see the file doc/CREDITS for a complete list of authors.
+# Copyright (C) 2003-2006 Dirk Meyer, et al.
+#
+# First Edition: Dirk Meyer <[EMAIL PROTECTED]>
+# Maintainer: Dirk Meyer <[EMAIL PROTECTED]>
+#
+# Please see the file AUTHORS for a complete list of authors.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -53,7 +53,7 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# ----------------------------------------------------------------------- */
+# -----------------------------------------------------------------------------
__all__ = [ 'fxdhandler' ]
Modified: trunk/ui/src/audio/interface.py
==============================================================================
--- trunk/ui/src/audio/interface.py (original)
+++ trunk/ui/src/audio/interface.py Fri Jan 26 15:39:10 2007
@@ -1,20 +1,21 @@
# -*- coding: iso-8859-1 -*-
-# -----------------------------------------------------------------------
+# -----------------------------------------------------------------------------
# interface.py - interface between mediamenu and audio
-# -----------------------------------------------------------------------
+# -----------------------------------------------------------------------------
# $Id$
#
-# This file defines the PluginInterface for the audio module
-# of Freevo. It is loaded by __init__.py and will activate the
-# mediamenu for audio.
+# This file defines the PluginInterface for the audio module of
+# Freevo. It is loaded by __init__.py and will activate the mediamenu
+# for audio.
#
-# Notes:
-# Todo:
-#
-# -----------------------------------------------------------------------
+# -----------------------------------------------------------------------------
# Freevo - A Home Theater PC framework
-# Copyright (C) 2002-2005 Krister Lagerstrom, Dirk Meyer, et al.
-# Please see the file doc/CREDITS for a complete list of authors.
+# Copyright (C) 2002 Krister Lagerstrom, 2003-2006 Dirk Meyer, et al.
+#
+# First Edition: Dirk Meyer <[EMAIL PROTECTED]>
+# Maintainer: Dirk Meyer <[EMAIL PROTECTED]>
+#
+# Please see the file AUTHORS for a complete list of authors.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -30,7 +31,7 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# ----------------------------------------------------------------------- */
+# -----------------------------------------------------------------------------
# only export 'PluginInterface' to the outside. This will be used
# with plugin.activate('audio') and everything else should be handled
@@ -69,7 +70,7 @@
# activate the mediamenu for audio
level = plugin.is_active('audio')[2]
plugin.activate('mediamenu', level=level, args='audio')
-
+
def suffix(self):
"""
Modified: trunk/ui/src/audio/player.py
==============================================================================
--- trunk/ui/src/audio/player.py (original)
+++ trunk/ui/src/audio/player.py Fri Jan 26 15:39:10 2007
@@ -6,7 +6,7 @@
#
# -----------------------------------------------------------------------------
# Freevo - A Home Theater PC framework
-# Copyright (C) 2002-2007 Krister Lagerstrom, Dirk Meyer, et al.
+# Copyright (C) 2007 Dirk Meyer, et al.
#
# First Edition: Dirk Meyer <[EMAIL PROTECTED]>
# Maintainer: Dirk Meyer <[EMAIL PROTECTED]>
Modified: trunk/ui/src/audio/plugins/artist.py
==============================================================================
--- trunk/ui/src/audio/plugins/artist.py (original)
+++ trunk/ui/src/audio/plugins/artist.py Fri Jan 26 15:39:10 2007
@@ -12,7 +12,7 @@
#
# -----------------------------------------------------------------------------
# Freevo - A Home Theater PC framework
-# Copyright (C) 2006 Krister Lagerstrom, Dirk Meyer, et al.
+# Copyright (C) 2006 Dirk Meyer, et al.
#
# First Edition: Dirk Meyer <[EMAIL PROTECTED]>
# Maintainer: Dirk Meyer <[EMAIL PROTECTED]>
Modified: trunk/ui/src/beacon.py
==============================================================================
--- trunk/ui/src/beacon.py (original)
+++ trunk/ui/src/beacon.py Fri Jan 26 15:39:10 2007
@@ -1,4 +1,40 @@
+# -*- coding: iso-8859-1 -*-
+# -----------------------------------------------------------------------------
+# beacon.py - interface to kaa.beacon
+# -----------------------------------------------------------------------------
+# $Id$
+#
+# This file extends beacon with some functiosn freevo needs.
+#
+# -----------------------------------------------------------------------------
+# Freevo - A Home Theater PC framework
+# Copyright (C) 2006 Dirk Meyer, et al.
+#
+# First Edition: Dirk Meyer <[EMAIL PROTECTED]>
+# Maintainer: Dirk Meyer <[EMAIL PROTECTED]>
+#
+# Please see the file AUTHORS for a complete list of authors.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MER-
+# CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# -----------------------------------------------------------------------------
+
+# python imports
import sys
+
+# kaa imports
import kaa.beacon
class ExtMap(dict):
@@ -9,7 +45,7 @@
self[attr] = []
return self[attr]
return r
-
+
def extmap_filter(results):
extmap = ExtMap()
if not isinstance(results, (list, tuple)):
Modified: trunk/ui/src/directory.py
==============================================================================
--- trunk/ui/src/directory.py (original)
+++ trunk/ui/src/directory.py Fri Jan 26 15:39:10 2007
@@ -6,12 +6,12 @@
#
# -----------------------------------------------------------------------------
# Freevo - A Home Theater PC framework
-# Copyright (C) 2002-2005 Krister Lagerstrom, Dirk Meyer, et al.
+# Copyright (C) 2002 Krister Lagerstrom, 2003-2007 Dirk Meyer, et al.
#
# First Edition: Dirk Meyer <[EMAIL PROTECTED]>
# Maintainer: Dirk Meyer <[EMAIL PROTECTED]>
#
-# Please see the file doc/CREDITS for a complete list of authors.
+# Please see the file AUTHORS for a complete list of authors.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -182,7 +182,7 @@
# Check mimetype plugins if they want to add something
for p in plugin.mimetype(type):
p.dirinfo(self)
-
+
def __getitem__(self, key):
"""
@@ -267,7 +267,7 @@
if self.display_type == 'tv':
return 'video' in value
return self.display_type in value
-
+
return Item.__getitem__(self, key)
@@ -308,10 +308,6 @@
else:
OSD_MESSAGE.post('Show all items')
- if event == PLAY_START and event.arg in self.item_menu.choices:
- # update selection and pass the event to playlist after that
- self.item_menu.select(event.arg)
-
return Playlist.eventhandler(self, event)
Modified: trunk/ui/src/event.py
==============================================================================
--- trunk/ui/src/event.py (original)
+++ trunk/ui/src/event.py Fri Jan 26 15:39:10 2007
@@ -1,16 +1,17 @@
# -*- coding: iso-8859-1 -*-
-# -----------------------------------------------------------------------
+# -----------------------------------------------------------------------------
# event.py - Global events for Freevo
-# -----------------------------------------------------------------------
+# -----------------------------------------------------------------------------
# $Id$
#
-# Notes:
-# Todo:
-#
-# -----------------------------------------------------------------------
+# -----------------------------------------------------------------------------
# Freevo - A Home Theater PC framework
-# Copyright (C) 2002-2005 Krister Lagerstrom, Dirk Meyer, et al.
-# Please see the file doc/CREDITS for a complete list of authors.
+# Copyright (C) 2002 Krister Lagerstrom, 2003-2007 Dirk Meyer, et al.
+#
+# First Edition: Dirk Meyer <[EMAIL PROTECTED]>
+# Maintainer: Dirk Meyer <[EMAIL PROTECTED]>
+#
+# Please see the file AUTHORS for a complete list of authors.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -26,7 +27,7 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# ----------------------------------------------------------------------- */
+# -----------------------------------------------------------------------------
import kaa.notifier
@@ -48,7 +49,7 @@
"""
self.handler = handler
-
+
def __int__(self):
"""
Return the event as int (the last char of the name will be returned
@@ -76,10 +77,10 @@
PLAYLIST_NEXT = Event('PLAYLIST_NEXT')
PLAYLIST_PREV = Event('PLAYLIST_PREV')
PLAYLIST_TOGGLE_REPEAT = Event('PLAYLIST_TOGGLE_REPEAT')
-
+
EJECT = Event('EJECT')
-TOGGLE_APPLICATION = Event('TOGGLE_APPLICATION')
-
+TOGGLE_APPLICATION = Event('TOGGLE_APPLICATION')
+
#
# Menu
#
@@ -90,11 +91,11 @@
MENU_DOWN = Event('MENU_DOWN')
MENU_PAGEUP = Event('MENU_PAGEUP')
MENU_PAGEDOWN = Event('MENU_PAGEDOWN')
-
+
MENU_GOTO_MAINMENU = Event('MENU_GOTO_MAINMENU')
MENU_GOTO_MEDIA = Event('MENU_GOTO_MEDIA')
MENU_BACK_ONE_MENU = Event('MENU_BACK_ONE_MENU')
-
+
MENU_SELECT = Event('MENU_SELECT')
MENU_CHANGE_SELECTION = Event('MENU_CHANGE_SELECTION')
MENU_PLAY_ITEM = Event('MENU_PLAY_ITEM')
@@ -215,30 +216,13 @@
# Call the function specified in event.arg
FUNCTION_CALL = Event('FUNCTION_CALL')
-# All buttons which are not mapped to an event will be send as
-# BOTTON event with the pressed button as arg
-BUTTON = Event('BUTTON')
-RATING = Event('RATING')
-
-
-
#
# Internal events, don't map any button on them
#
PLAY_END = Event('PLAY_END')
PLAY_START = Event('PLAY_START')
-
OSD_MESSAGE = Event('OSD_MESSAGE')
-VIDEO_START = Event('VIDEO_START')
-VIDEO_END = Event('VIDEO_END')
-
-OS_EVENT_POPEN2 = Event('OS_EVENT_POPEN2')
-OS_EVENT_WAITPID = Event('OS_EVENT_WAITPID')
-OS_EVENT_KILL = Event('OS_EVENT_KILL')
-
+# FIXME: delete this
RECORD = Event('RECORD')
-STOP_RECORDING = Event('STOP_RECORDING')
-RECORD_START = Event('RECORD_START')
-RECORD_STOP = Event('RECORD_STOP')
Modified: trunk/ui/src/image/__init__.py
==============================================================================
--- trunk/ui/src/image/__init__.py (original)
+++ trunk/ui/src/image/__init__.py Fri Jan 26 15:39:10 2007
@@ -4,23 +4,24 @@
# -----------------------------------------------------------------------------
# $Id$
#
-# This file imports everything needed to use this image module.
-# There is only one class provided for images, the PluginInterface
-# from interface.py. It is a MimetypePlugin that can be accessed
-# from plugin.mimetype(). It will also register an fxd handler for the
+# This file imports everything needed to use this image module. There
+# is only one class provided for images, the PluginInterface from
+# interface.py. It is a MimetypePlugin that can be accessed from
+# plugin.mimetype(). It will also register an fxd handler for the
# <slideshow> tag.
#
-# Image plugins are also allowed to use ImageItem to create a new ImageItem
-# and viewer, the viewer application
+# Image plugins are also allowed to use ImageItem to create a new
+# ImageItem and viewer, the viewer application
+#
#
# -----------------------------------------------------------------------------
# Freevo - A Home Theater PC framework
-# Copyright (C) 2002-2005 Krister Lagerstrom, Dirk Meyer, et al.
+# Copyright (C) 2002 Krister Lagerstrom, 2003-2006 Dirk Meyer, et al.
#
# First edition: Dirk Meyer <[EMAIL PROTECTED]>
# Maintainer: Dirk Meyer <[EMAIL PROTECTED]>
#
-# Please see the file doc/CREDITS for a complete list of authors.
+# Please see the file AUTHORS for a complete list of authors.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Modified: trunk/ui/src/image/fxdhandler.py
==============================================================================
--- trunk/ui/src/image/fxdhandler.py (original)
+++ trunk/ui/src/image/fxdhandler.py Fri Jan 26 15:39:10 2007
@@ -26,12 +26,12 @@
#
# -----------------------------------------------------------------------------
# Freevo - A Home Theater PC framework
-# Copyright (C) 2002-2005 Krister Lagerstrom, Dirk Meyer, et al.
+# Copyright (C) 2003-2006 Dirk Meyer, et al.
#
# First Edition: Dirk Meyer <[EMAIL PROTECTED]>
# Maintainer: Dirk Meyer <[EMAIL PROTECTED]>
#
-# Please see the file doc/CREDITS for a complete list of authors.
+# Please see the file AUTHORS for a complete list of authors.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Modified: trunk/ui/src/image/imageitem.py
==============================================================================
--- trunk/ui/src/image/imageitem.py (original)
+++ trunk/ui/src/image/imageitem.py Fri Jan 26 15:39:10 2007
@@ -4,17 +4,17 @@
# -----------------------------------------------------------------------------
# $Id$
#
-# An ImageItem is an Item handling image files for Freevo. It will
-# use the viewer in viewer.py to display the image
+# An ImageItem is an Item handling image files for Freevo. It will use
+# the viewer in viewer.py to display the image
#
# -----------------------------------------------------------------------------
# Freevo - A Home Theater PC framework
-# Copyright (C) 2002-2005 Krister Lagerstrom, Dirk Meyer, et al.
+# Copyright (C) 2002 Krister Lagerstrom, 2003-2007 Dirk Meyer, et al.
#
# First Edition: Dirk Meyer <[EMAIL PROTECTED]>
# Maintainer: Dirk Meyer <[EMAIL PROTECTED]>
#
-# Please see the file doc/CREDITS for a complete list of authors.
+# Please see the file AUTHORS for a complete list of authors.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Modified: trunk/ui/src/image/interface.py
==============================================================================
--- trunk/ui/src/image/interface.py (original)
+++ trunk/ui/src/image/interface.py Fri Jan 26 15:39:10 2007
@@ -4,18 +4,18 @@
# -----------------------------------------------------------------------------
# $Id$
#
-# This file defines the PluginInterface for the image module
-# of Freevo. It is loaded by __init__.py and will activate the
-# mediamenu for images.
+# This file defines the PluginInterface for the image module of
+# Freevo. It is loaded by __init__.py and will activate the mediamenu
+# for images.
#
# -----------------------------------------------------------------------------
# Freevo - A Home Theater PC framework
-# Copyright (C) 2002-2005 Krister Lagerstrom, Dirk Meyer, et al.
+# Copyright (C) 2002 Krister Lagerstrom, 2003-2006 Dirk Meyer, et al.
#
# First Edition: Dirk Meyer <[EMAIL PROTECTED]>
# Maintainer: Dirk Meyer <[EMAIL PROTECTED]>
#
-# Please see the file doc/CREDITS for a complete list of authors.
+# Please see the file AUTHORS for a complete list of authors.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Modified: trunk/ui/src/image/plugins/apod.py
==============================================================================
--- trunk/ui/src/image/plugins/apod.py (original)
+++ trunk/ui/src/image/plugins/apod.py Fri Jan 26 15:39:10 2007
@@ -6,12 +6,12 @@
#
# -----------------------------------------------------------------------------
# Freevo - A Home Theater PC framework
-# Copyright (C) 2002-2005 Krister Lagerstrom, Dirk Meyer, et al.
+# Copyright (C) 2003-2007 Dirk Meyer, et al.
#
# First Edition: Michael Ruelle <[EMAIL PROTECTED]>
-# Maintainer: Michael Ruelle <[EMAIL PROTECTED]>
+# Maintainer: Dirk Meyer <[EMAIL PROTECTED]>
#
-# Please see the file doc/CREDITS for a complete list of authors.
+# Please see the file AUTHORS for a complete list of authors.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -44,10 +44,8 @@
from menu import Item, Action, ActionItem, Menu
from image import ImageItem
-
from application import TextWindow, MessageWindow
-
class ApodMainMenuItem(Item):
"""
This is the item for the main menu and creates the list
@@ -73,8 +71,7 @@
Create a menu for APOD.
"""
# current image
- current = ActionItem(_('Current Picture'), self,
- self.fetch_current_picture)
+ current = ActionItem(_('Current Picture'), self, self.fetch_picture)
current.description = _('Download the current picture')
# previous images
@@ -103,20 +100,20 @@
MessageWindow(_('No Images found')).show()
- def fetch_current_picture(self):
+ def fetch_picture(self):
"""
Fetch current picture.
"""
box = TextWindow(text=_('Getting picture, please wait'))
box.show()
- thread = Thread(self.__fetch_current_picture_thread)
-
thread.signals['completed'].connect(self.__fetch_current_picture_finished, box)
-
thread.signals['exception'].connect(self.__fetch_current_picture_error, box)
+ thread = Thread(self._fetch_picture_thread)
+ thread.signals['completed'].connect(self._fetch_picture_finished, box)
+ thread.signals['exception'].connect(self._fetch_picture_error, box)
thread.start()
- def __fetch_current_picture_thread(self):
+ def _fetch_picture_thread(self):
"""
Fetch current picture.
"""
@@ -139,7 +136,7 @@
raise 'Could not open %s%s: %s' % (url, ref, e)
- def __fetch_current_picture_error(self, error, box):
+ def _fetch_picture_error(self, error, box):
"""
Handle error for the thread in the main loop.
"""
@@ -149,7 +146,7 @@
MessageWindow(error).show()
- def __fetch_current_picture_finished(self, filename, box):
+ def _fetch_picture_finished(self, filename, box):
"""
Download finished.
"""
Modified: trunk/ui/src/image/viewer.py
==============================================================================
--- trunk/ui/src/image/viewer.py (original)
+++ trunk/ui/src/image/viewer.py Fri Jan 26 15:39:10 2007
@@ -6,12 +6,12 @@
#
# -----------------------------------------------------------------------------
# Freevo - A Home Theater PC framework
-# Copyright (C) 2002-2005 Krister Lagerstrom, Dirk Meyer, et al.
+# Copyright (C) 2002 Krister Lagerstrom, 2003-2006 Dirk Meyer, et al.
#
# First Edition: Dirk Meyer <[EMAIL PROTECTED]>
# Maintainer: Dirk Meyer <[EMAIL PROTECTED]>
#
-# Please see the file doc/CREDITS for a complete list of authors.
+# Please see the file AUTHORS for a complete list of authors.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -29,7 +29,6 @@
#
# -----------------------------------------------------------------------------
-
__all__ = [ 'viewer' ]
# python imports
Modified: trunk/ui/src/mainmenu.py
==============================================================================
--- trunk/ui/src/mainmenu.py (original)
+++ trunk/ui/src/mainmenu.py Fri Jan 26 15:39:10 2007
@@ -7,13 +7,14 @@
# This file contains the main menu and a class for main menu plugins. There
# is also eventhandler support for the main menu showing the skin chooser.
#
+# -----------------------------------------------------------------------------
+# Freevo - A Home Theater PC framework
+# Copyright (C) 2005-2006 Dirk Meyer, et al.
+#
# First edition: Dirk Meyer <[EMAIL PROTECTED]>
# Maintainer: Dirk Meyer <[EMAIL PROTECTED]>
#
-# -----------------------------------------------------------------------------
-# Freevo - A Home Theater PC framework
-# Copyright (C) 2002-2005 Krister Lagerstrom, Dirk Meyer, et al.
-# Please see the file doc/CREDITS for a complete list of authors.
+# Please see the file AUTHORS for a complete list of authors.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Modified: trunk/ui/src/playlist.py
==============================================================================
--- trunk/ui/src/playlist.py (original)
+++ trunk/ui/src/playlist.py Fri Jan 26 15:39:10 2007
@@ -4,16 +4,14 @@
# -----------------------------------------------------------------------------
# $Id$
#
-# TODO: o fix MEMCHECKER comments
-#
# -----------------------------------------------------------------------------
# Freevo - A Home Theater PC framework
-# Copyright (C) 2002-2005 Krister Lagerstrom, Dirk Meyer, et al.
+# Copyright (C) 2002 Krister Lagerstrom, 2003-2007 Dirk Meyer, et al.
#
# First Edition: Dirk Meyer <[EMAIL PROTECTED]>
# Maintainer: Dirk Meyer <[EMAIL PROTECTED]>
#
-# Please see the file doc/CREDITS for a complete list of authors.
+# Please see the file AUTHORS for a complete list of authors.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Modified: trunk/ui/src/plugin.py
==============================================================================
--- trunk/ui/src/plugin.py (original)
+++ trunk/ui/src/plugin.py Fri Jan 26 15:39:10 2007
@@ -9,12 +9,12 @@
#
# -----------------------------------------------------------------------------
# Freevo - A Home Theater PC framework
-# Copyright (C) 2002-2005 Krister Lagerstrom, Dirk Meyer, et al.
+# Copyright (C) 2003-2006 Dirk Meyer, et al.
#
# First Edition: Dirk Meyer <[EMAIL PROTECTED]>
# Maintainer: Dirk Meyer <[EMAIL PROTECTED]>
#
-# Please see the file doc/CREDITS for a complete list of authors.
+# Please see the file AUTHORS for a complete list of authors.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Modified: trunk/ui/src/plugin_loader.py
==============================================================================
--- trunk/ui/src/plugin_loader.py (original)
+++ trunk/ui/src/plugin_loader.py Fri Jan 26 15:39:10 2007
@@ -7,17 +7,14 @@
# This file is the basic plugin interface for Freevo. It defines simple plugin
# base classes functions to add or remove a plugin.
#
-# TODO: o make it possible to remove plugins later
-# o more cleanup
-#
# -----------------------------------------------------------------------------
# Freevo - A Home Theater PC framework
-# Copyright (C) 2002-2005 Krister Lagerstrom, Dirk Meyer, et al.
+# Copyright (C) 2003-2006 Dirk Meyer, et al.
#
# First Edition: Dirk Meyer <[EMAIL PROTECTED]>
# Maintainer: Dirk Meyer <[EMAIL PROTECTED]>
#
-# Please see the file doc/CREDITS for a complete list of authors.
+# Please see the file AUTHORS for a complete list of authors.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -85,7 +82,7 @@
# list of all plugins
self.plugins = []
self.loaded_plugins = []
-
+
# next id for a plugin
self.next_id = 0
# plugins sorted by type
@@ -171,7 +168,7 @@
"""
self.__initialized = True
self.path = plugin_path
-
+
for name, type, level, args, number in self.plugins:
kaa.notifier.step(False, True)
if callback:
@@ -333,7 +330,7 @@
self.names[p._plugin_name] = p
self.loaded_plugins.append(p)
-
+
except:
log.exception('failed to load plugin %s' % name)
-------------------------------------------------------------------------
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