Author: dmeyer
Date: Fri Oct 27 18:33:23 2006
New Revision: 8486

Modified:
   trunk/core/src/conf.py
   trunk/core/src/ipc/tvserver.py
   trunk/tvserver/src/favorite.py
   trunk/tvserver/src/recorder.py
   trunk/tvserver/src/recording.py
   trunk/tvserver/src/server.py
   trunk/ui/src/gui/imagelib.py
   trunk/ui/src/gui/widgets/text.py
   trunk/ui/src/image/fxdhandler.py
   trunk/ui/src/plugins/lcd.py
   trunk/ui/src/plugins/mbus.py
   trunk/ui/src/sysconfig.py
   trunk/ui/src/tv/program.py
   trunk/ui/src/video/videoitem.py
   trunk/webserver/src/base.py
   trunk/webserver/src/pages/recordings.py

Log:
Remove stupid String() helper function, Unicode() will follow later

Modified: trunk/core/src/conf.py
==============================================================================
--- trunk/core/src/conf.py      (original)
+++ trunk/core/src/conf.py      Fri Oct 27 18:33:23 2006
@@ -14,8 +14,8 @@
 #
 # This module provides some basic settings to solve that problems. It reads
 # a config file and stores everything in a struct. It will create necessary
-# directories for vfs and caching and provides helper functions Unicode
-# and String to solve the encoding problem.
+# directories for vfs and caching and provides helper function Unicode
+# to solve the encoding problem.
 #
 # If you want to use an util module in a different project, you may also
 # need this file. The name freevo in the config file can be changed at the
@@ -56,7 +56,7 @@
 
 # That's it, you shouldn't need to make changes after this point
 
-__all__ = [ 'Unicode', 'String', 'cachefile', 'datafile', 'SHAREDIR',
+__all__ = [ 'Unicode', 'cachefile', 'datafile', 'SHAREDIR',
             'DATADIR', 'ENCODING' ]
 
 # Python imports
@@ -71,7 +71,6 @@
 
 # kaa imports
 from kaa.strutils import to_unicode as Unicode
-from kaa.strutils import to_str as String
 from kaa.strutils import ENCODING
 from kaa.config import Var, Group, Dict, List
 from kaa.config import Config as KaaConfig
@@ -201,9 +200,8 @@
 # set log level
 logger.setLevel(logging.WARNING)
 
-# add Unicode and String to the global scope
+# add Unicode to the global scope
 __builtin__.__dict__['Unicode'] = Unicode
-__builtin__.__dict__['String']  = String
 
 
 def garbage_collect():

Modified: trunk/core/src/ipc/tvserver.py
==============================================================================
--- trunk/core/src/ipc/tvserver.py      (original)
+++ trunk/core/src/ipc/tvserver.py      Fri Oct 27 18:33:23 2006
@@ -43,6 +43,7 @@
 # kaa imports
 import kaa.epg
 import kaa.notifier
+from kaa.strutils import unicode_to_str
 
 # get logging object
 log = logging.getLogger('record')
@@ -91,7 +92,7 @@
 
 
     def __str__(self):
-        return String(self.__unicode__())
+        return unicode_to_str(self.__unicode__())
 
 
     def __getitem__(self, key):

Modified: trunk/tvserver/src/favorite.py
==============================================================================
--- trunk/tvserver/src/favorite.py      (original)
+++ trunk/tvserver/src/favorite.py      Fri Oct 27 18:33:23 2006
@@ -169,7 +169,7 @@
             # url is string and an extra '/' is not allowed. Replace '/'
             # with '_' and also convert all args to string.
             for o in options:
-                options[o] = String(options[o]).replace('/', '_')
+                options[o] = unicode_to_str(options[o]).replace('/', '_')
         for pattern in re.findall('%\([a-z]*\)', text):
             if not str(pattern[2:-1]) in options:
                 options[pattern[2:-1]] = pattern
@@ -189,7 +189,7 @@
         if self.url:
             # add url template to recording
             try:
-                rec.url = String(self.__fill_template(rec, self.url, True) + 
'.suffix')
+                rec.url = unicode_to_str(self.__fill_template(rec, self.url, 
True) + '.suffix')
             except Exception, e:
                 log.exception('Error setting recording url')
                 rec.url = ''
@@ -221,7 +221,7 @@
         else:
             substring = '(exact matching)'
         return '%3d %-35s %4d %s %s' % \
-               (self.id, String(name), self.priority, once, substring)
+               (self.id, unicode_to_str(name), self.priority, once, substring)
 
 
     def __xml__(self):

Modified: trunk/tvserver/src/recorder.py
==============================================================================
--- trunk/tvserver/src/recorder.py      (original)
+++ trunk/tvserver/src/recorder.py      Fri Oct 27 18:33:23 2006
@@ -44,6 +44,7 @@
 
 # kaa imports
 from kaa.notifier import OneShotTimer, Signal
+from kaa.strutils import unicode_to_str
 import kaa.epg
 
 # freevo core imports
@@ -242,7 +243,7 @@
         sys.exit(0)
 
     def normalize_name(self, name):
-        return String(name.replace('.', '').replace(' ', '')).upper().strip()
+        return unicode_to_str(name.replace('.', '').replace(' ', 
'')).upper().strip()
 
     def add_channel(self, chan_obj, chan_id):
         if chan_obj.name in self.known_channels:
@@ -349,8 +350,8 @@
         Return url (e.g. filename) for the given recording
         """
         if not rec.url:
-            filename_array = { 'progname': String(rec.name),
-                               'title'   : String(rec.subtitle) }
+            filename_array = { 'progname': unicode_to_str(rec.name),
+                               'title'   : unicode_to_str(rec.subtitle) }
 
             filemask = config.record.filemask % filename_array
             filename = ''
@@ -423,7 +424,7 @@
                 channel  = self.known_channels[rec.channel].tuner_id
                 filename = self.get_url(rec)
                 rec.url  = filename
-                log.info('%s: schedule %s' % (String(self.name), 
String(rec.name)))
+                log.info('%s: schedule %s', self.name, rec.name)
                 rpc = self.rpc('home-theatre.vdr.record', 
self.start_recording_cb)
                 rpc.call(self.device, channel, remote.start,
                          rec.stop + rec.stop_padding, filename, ())

Modified: trunk/tvserver/src/recording.py
==============================================================================
--- trunk/tvserver/src/recording.py     (original)
+++ trunk/tvserver/src/recording.py     Fri Oct 27 18:33:23 2006
@@ -102,7 +102,7 @@
             if key in ('subtitle', 'description') and value:
                 setattr(self, key, Unicode(value))
             elif key == 'url' and value:
-                self.url = String(value)
+                self.url = unicode_to_str(value)
             elif key in ('start-padding', 'stop_padding'):
                 setattr(self, key, int(value))
             elif value:
@@ -190,10 +190,10 @@
             stop_padding = 0
 
         return '%3d %10s %-25s %4d %s-%s %2s %2s %s' % \
-               (self.id, String(channel), String(name),
+               (self.id, unicode_to_str(channel), unicode_to_str(name),
                 self.priority, _int2time(self.start)[4:],
                 _int2time(self.stop)[9:], start_padding,
-                stop_padding, String(status))
+                stop_padding, unicode_to_str(status))
 
 
     def __xml__(self):

Modified: trunk/tvserver/src/server.py
==============================================================================
--- trunk/tvserver/src/server.py        (original)
+++ trunk/tvserver/src/server.py        Fri Oct 27 18:33:23 2006
@@ -395,7 +395,7 @@
         """
         info = dict(info)
 
-        log.info('recording.add: %s' % String(name))
+        log.info('recording.add: %s', name)
         r = Recording(name, channel, priority, start, stop, info=info)
 
         if r in self.recordings:
@@ -559,7 +559,7 @@
         days is a list of days ( 0 = Sunday - 6 = Saturday )
         times is a list of hh:mm-hh:mm
         """
-        log.info('favorite.add: %s' % String(name))
+        log.info('favorite.add: %s', name)
         f = Favorite(name, channels, priority, days, times, once)
         if f in self.favorites:
             return NameError('Already scheduled')

Modified: trunk/ui/src/gui/imagelib.py
==============================================================================
--- trunk/ui/src/gui/imagelib.py        (original)
+++ trunk/ui/src/gui/imagelib.py        Fri Oct 27 18:33:23 2006
@@ -113,7 +113,7 @@
     try:
         image = kaa.mevas.imagelib.open(filename)
     except:
-        log.exception('Problem while loading image %s' % String(url))
+        log.exception('Problem while loading image %s', url)
         image = None
 
     # scale the image if needed

Modified: trunk/ui/src/gui/widgets/text.py
==============================================================================
--- trunk/ui/src/gui/widgets/text.py    (original)
+++ trunk/ui/src/gui/widgets/text.py    Fri Oct 27 18:33:23 2006
@@ -36,6 +36,8 @@
 import os
 import logging
 
+from kaa.strutils import to_str
+
 # mevas imports
 import kaa.mevas
 from kaa.mevas.image import CanvasImage
@@ -248,5 +250,5 @@
             t = self.text[:20]
         else:
             t = self.text
-        return 'Text: "%s", zindex=%s' % (String(t), self.get_zindex())
+        return 'Text: "%s", zindex=%s' % (to_str(t), self.get_zindex())
     

Modified: trunk/ui/src/image/fxdhandler.py
==============================================================================
--- trunk/ui/src/image/fxdhandler.py    (original)
+++ trunk/ui/src/image/fxdhandler.py    Fri Oct 27 18:33:23 2006
@@ -54,6 +54,9 @@
 # python imports
 import os
 
+# kaa imports
+from kaa.strutils import unicode_to_str
+
 # Freevo imports
 import config
 import plugin
@@ -81,7 +84,7 @@
     # Create a list of all images for the slideshow
     for child in children:
         try:
-            fname  = os.path.join(dirname, String(fxd.gettext(child)))
+            fname  = os.path.join(dirname, unicode_to_str(fxd.gettext(child)))
             files  = []
             if child.name == 'directory':
                 # for directories add all files in it

Modified: trunk/ui/src/plugins/lcd.py
==============================================================================
--- trunk/ui/src/plugins/lcd.py (original)
+++ trunk/ui/src/plugins/lcd.py Fri Oct 27 18:33:23 2006
@@ -12,48 +12,6 @@
 #    2) Have Movie Player, TV Player and Image viewer to use LCD
 #    3) Better (and more) LCD screens.
 # -----------------------------------------------------------------------
-# $Log$
-# Revision 1.29  2005/08/07 14:04:12  dischi
-# remove MenuItem
-#
-# Revision 1.28  2005/08/06 14:50:32  dischi
-# adjust to kaa.notifier.Timer.start now using seconds
-#
-# Revision 1.27  2005/07/22 19:30:24  dischi
-# fix event handling
-#
-# Revision 1.26  2005/07/16 11:40:28  dischi
-# remove poll_menu_only
-#
-# Revision 1.25  2005/07/15 20:42:53  dischi
-# remove variable event_listener, not needed anymore
-#
-# Revision 1.24  2005/06/09 19:43:53  dischi
-# clean up eventhandler usage
-#
-# Revision 1.23  2005/01/08 15:40:53  dischi
-# remove TRUE, FALSE, DEBUG and HELPER
-#
-# Revision 1.22  2004/11/27 19:11:29  dischi
-# fix bad log statement
-#
-# Revision 1.21  2004/11/20 18:23:03  dischi
-# use python logger module for debug
-#
-# Revision 1.20  2004/08/11 17:56:09  gsbarbieri
-# Improve unicode support using String() everywhere.
-#
-# Revision 1.19  2004/07/11 11:14:53  dischi
-# lcd detach fixes from Magnus Schmidt
-#
-# Revision 1.18  2004/07/10 12:33:40  dischi
-# header cleanup
-#
-# Revision 1.17  2004/02/23 05:30:28  gsbarbieri
-# Better i18n support. Changed a lot of strings to cooperate with translators
-# and made the menu items (not dirs, audio or video ones!) to use translations.
-#
-# -----------------------------------------------------------------------
 # 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.
@@ -77,6 +35,9 @@
 
 import copy
 import time
+
+from kaa.strutils import to_str
+
 import plugin
 from event import *
 import config
@@ -88,7 +49,7 @@
 try:
     import pylcd
 except:
-    print String(_("ERROR")+": "+_("You need pylcd to run \"lcd\" plugin."))
+    print to_str(_("ERROR")+": "+_("You need pylcd to run \"lcd\" plugin."))
 
 
 # Configuration: (Should move to freevo_conf.py?)
@@ -184,7 +145,7 @@
                                  "Freevo",
                                  None ),
                   "calendar" : ( "scroller",
-                                 "1 2 %d 2 m 3 \"" + String(_( "Today is %s." 
)) + "%s\"",
+                                 "1 2 %d 2 m 3 \"" + to_str(_( "Today is %s." 
)) + "%s\"",
                                  "( self.width, time.strftime('%A, %d-%B'), 
self.get_sepstrmscroll(time.strftime('%A, %d-%B')) )" ),
                   "clock"    : ( "string",
                                  "%d 3 \"%s\"",
@@ -194,16 +155,16 @@
                 
                 "menu"    :
                 { "title_l"  : ( "string",
-                                 "1 1 '" + rjust( String(_( "Menu" )), 4 ) + 
": '",
+                                 "1 1 '" + rjust( to_str(_( "Menu" )), 4 ) + 
": '",
                                  None ),
                   "item_l"   : ( "string",
-                                 "1 2 '" + rjust( String(_( "Item" )), 4 ) + 
": '",
+                                 "1 2 '" + rjust( to_str(_( "Item" )), 4 ) + 
": '",
                                  None ),
                   "type_l"   : ( "string",
-                                 "1 3 '" + rjust( String(_( "Type" )), 4 ) + 
": '",
+                                 "1 3 '" + rjust( to_str(_( "Type" )), 4 ) + 
": '",
                                  None ),
                   "info_l"   : ( "string",
-                                 "1 4 '" + rjust( String(_( "Information" )), 
4 ) + ": '",
+                                 "1 4 '" + rjust( to_str(_( "Information" )), 
4 ) + ": '",
                                  None ),                
                   "title_v"  : ( "scroller",
                                  "7 1 %d 1 m 3 \"%s%s\"",
@@ -221,13 +182,13 @@
                 
                 "audio_player"  :
                 { "music_l"   : ( "string",
-                                  "1 1 '" + rjust( String(_( "Music" )), 5 ) + 
": '",
+                                  "1 1 '" + rjust( to_str(_( "Music" )), 5 ) + 
": '",
                                   None ),
                   "album_l"   : ( "string",
-                                  "1 2 '" + rjust( String(_( "Album" )), 5 ) + 
": '",
+                                  "1 2 '" + rjust( to_str(_( "Album" )), 5 ) + 
": '",
                                   None ),
                   "artist_l"  : ( "string",
-                                  "1 3 '" + rjust( String(_( "Artist" )), 5 ) 
+ ": '",
+                                  "1 3 '" + rjust( to_str(_( "Artist" )), 5 ) 
+ ": '",
                                   None ),
                   "music_v"   : ( "scroller",
                                   "9 1 %d 1 m 3 \"%s%s\"",
@@ -259,13 +220,13 @@
 
                 "video_player"  :
                 { "video_l"   : ( "string",
-                                  "2 1 '" + rjust( String(_( "Video" )), 5 ) + 
": '",
+                                  "2 1 '" + rjust( to_str(_( "Video" )), 5 ) + 
": '",
                                   None ),
                   "tag_l"     : ( "string",
-                                  "2 2 '" + rjust( String(_( "Tagline" )), 5 ) 
+ ": '",
+                                  "2 2 '" + rjust( to_str(_( "Tagline" )), 5 ) 
+ ": '",
                                   None ),
                   "genre_l"   : ( "string",
-                                  "1 3 '" + rjust( String(_( "Genre" )), 5 ) + 
": '",
+                                  "1 3 '" + rjust( to_str(_( "Genre" )), 5 ) + 
": '",
                                   None ),
                   "video_v"   : ( "scroller",
                                   "9 1 %d 1 m 3 \"%s%s\"",
@@ -298,16 +259,16 @@
                 
                 "tv"            :
                 { "chan_l"   : ( "string",
-                                 "1 1 '" + rjust( String(_( "Channel" )), 4 ) 
+ ": '",
+                                 "1 1 '" + rjust( to_str(_( "Channel" )), 4 ) 
+ ": '",
                                  None ),
                   "prog_l"   : ( "string",
-                                 "1 2 '" + rjust( String(_( "Program" )), 4 ) 
+ ": '",
+                                 "1 2 '" + rjust( to_str(_( "Program" )), 4 ) 
+ ": '",
                                  None ),
                   "time_l"  : ( "string",
-                                "1 3 '" + rjust( String(_( "Time" )), 4 ) + ": 
'",
+                                "1 3 '" + rjust( to_str(_( "Time" )), 4 ) + ": 
'",
                                 None ),
                   "desc_l"  : ( "string",
-                                "1 4 '" + rjust( String(_( "Description" )), 4 
) + ": '",
+                                "1 4 '" + rjust( to_str(_( "Description" )), 4 
) + ": '",
                                 None ),                
                   "chan_v"   : ( "scroller",
                                  "7 1 %d 1 m 3 \"%s%s\"",
@@ -332,7 +293,7 @@
                                  "Freevo",
                                  None ),
                   "calendar" : ( "scroller",
-                                 "1 2 %d 2 m 3 \"" + String(_( "Today is %s." 
)) + "%s\"",
+                                 "1 2 %d 2 m 3 \"" + to_str(_( "Today is %s." 
)) + "%s\"",
                                  "( self.width, time.strftime('%A, %d-%B'), 
self.get_sepstrmscroll(time.strftime('%A, %d-%B')) )" ),
                   "clock"    : ( "string",
                                  "%d 3 \"%s\"",
@@ -553,10 +514,10 @@
 
                  "menu":
                  { "title_l"  : ( "string",
-                                 "1 1 '" + rjust( String(_( "Menu" )), 4 ) + 
": '",
+                                 "1 1 '" + rjust( to_str(_( "Menu" )), 4 ) + 
": '",
                                  None ),
                   "item_l"   : ( "string",
-                                 "1 2 '" + rjust( String(_( "Item" )), 4 ) + 
": '",
+                                 "1 2 '" + rjust( to_str(_( "Item" )), 4 ) + 
": '",
                                  None ),
                    "title_v"  : ( "scroller",
                                   "7 1 %d 1 m 3 \"%s%s\"",
@@ -568,7 +529,7 @@
 
                  "audio_player":
                  { "music_l"   : ( "string",
-                                  "1 1 '" + rjust( String(_( "Music" )), 5 ) + 
": '",
+                                  "1 1 '" + rjust( to_str(_( "Music" )), 5 ) + 
": '",
                                   None ),
                   "music_v"   : ( "scroller",
                                   "8 1 %d 1 m 3 \"%s%s\"",
@@ -595,7 +556,7 @@
 
                 "video_player"  :
                 { "video_l"   : ( "string",
-                                  "2 1 '" + rjust( String(_( "Video" )), 5 ) + 
": '",
+                                  "2 1 '" + rjust( to_str(_( "Video" )), 5 ) + 
": '",
                                   None ),
                   "video_v"   : ( "scroller",
                                   "9 1 %d 1 m 3 \"%s%s\"",
@@ -623,10 +584,10 @@
 
                 "tv":
                 { "chan_l"   : ( "string",
-                                 "1 1 '" + rjust( String(_( "Channel" )), 4 ) 
+ ": '",
+                                 "1 1 '" + rjust( to_str(_( "Channel" )), 4 ) 
+ ": '",
                                  None ),
                   "prog_l"   : ( "string",
-                                 "1 2 '" + rjust( String(_( "Program" )), 4 ) 
+ ": '",
+                                 "1 2 '" + rjust( to_str(_( "Program" )), 4 ) 
+ ": '",
                                  None ),
                   "chan_v"   : ( "scroller",
                                  "7 1 %d 1 m 3 \"%s%s\"",
@@ -709,13 +670,13 @@
             self.lcd = pylcd.client()
             cm = self.lcd.connect()
         except:
-            print String(_( "ERROR" )) + ":" + String(_( "LCD plugin will not 
load! Maybe you don't have LCDd (lcdproc daemon) running?" ))
+            print to_str(_( "ERROR" )) + ":" + to_str(_( "LCD plugin will not 
load! Maybe you don't have LCDd (lcdproc daemon) running?" ))
             self.disable = 1
             return
         
         # if 1:
-        #     print String(_( "Connecting to LCD: %s" )) % cm
-        #     print String(_( "Info as know by the LCD module:" ))
+        #     print to_str(_( "Connecting to LCD: %s" )) % cm
+        #     print to_str(_( "Info as know by the LCD module:" ))
         #     self.lcd.getinfo()
         #     print ""
             
@@ -736,7 +697,7 @@
             type, param, val = self.screens[ "welcome" ][ w ]            
             if val: param = param % eval( val )
 
-            self.lcd.widget_set( "welcome", String( w ), String( param ) )
+            self.lcd.widget_set( "welcome", to_str( w ), to_str( param ) )
         
         self.lcd.screen_set( "welcome", "-priority 192 -duration 2 -heartbeat 
off" )
         self.last_screen = "welcome"
@@ -782,7 +743,7 @@
 
         if type == "menu":   
             menu  = object.menustack[ -1 ]
-            title = String( menu.selected.name )
+            title = to_str( menu.selected.name )
             typeinfo = menu.selected.type
             info = ""
 
@@ -802,21 +763,21 @@
             if menu.selected.type == "audio":
                 title = menu.selected.getattr( "title" )
                 if not title:
-                    title = String( menu.selected.getattr( "name" ) )
+                    title = to_str( menu.selected.getattr( "name" ) )
                 if menu.selected.getattr( "trackno" ):
                     title = "%s - %s" % ( menu.selected.getattr( "trackno" ),
-                                          String( title ) )
+                                          to_str( title ) )
                     
         elif type == "player":
             player = object
-            title  = String( player.getattr( "title" ) )
+            title  = to_str( player.getattr( "title" ) )
             if not title:
-                title = String( player.getattr( "name" ) )
+                title = to_str( player.getattr( "name" ) )
                 
             if player.type == "audio":
                 if player.getattr( "trackno" ):
                     title = "%s - %s" % ( player.getattr( "trackno" ),
-                                          String( title ) )
+                                          to_str( title ) )
                     
             elif player.type == "video":
                 length = player.getattr( "length" )
@@ -855,7 +816,7 @@
             except:
                 param = None
 
-            k = "%s %s" % ( sname, String( w ) )
+            k = "%s %s" % ( sname, to_str( w ) )
             try:
                 if self.lsv[ k ] == param:
                     continue # nothing changed in this widget
@@ -864,8 +825,8 @@
 
             self.lsv[ k ] = param
             if param:
-                self.lcd.widget_set( sname, String( w ),
-                                     String( param ) )
+                self.lcd.widget_set( sname, to_str( w ),
+                                     to_str( param ) )
                                      
         if self.last_screen != sname:
             self.lcd.screen_set( self.last_screen, "-priority 128" )
@@ -892,7 +853,7 @@
 
                 if val: param = param % eval( val )
                 
-                self.lcd.widget_set( s, String( w ), String( param ) )
+                self.lcd.widget_set( s, to_str( w ), to_str( param ) )
         
 
     def generate_screens( self ):
@@ -908,7 +869,7 @@
                 log.warning( 'Could not find screens for %d lines LCD!' % l )
                 l -= 1
                 if l < 1:
-                    print String(_( "ERROR" )) + ": " + String(_( "No screens 
found for this LCD (%dx%d)!" )) % ( self.height, self.width )
+                    print to_str(_( "ERROR" )) + ": " + to_str(_( "No screens 
found for this LCD (%dx%d)!" )) % ( self.height, self.width )
                     self.disable = 1
                     return
         # find a display with 'l' line and 'c' columns
@@ -919,7 +880,7 @@
                 log.warning( 'Could not find screens for %d lines and %d 
columns LCD!' % ( l, c ) )
                 c -= 1
                 if c < 1:
-                    print String(_( "ERROR" )) + ": " + String(_( "No screens 
found for this LCD (%dx%d)!" )) % ( self.height, self.width )
+                    print to_str(_( "ERROR" )) + ": " + to_str(_( "No screens 
found for this LCD (%dx%d)!" )) % ( self.height, self.width )
                     self.disable = 1
                     return
 
@@ -930,7 +891,7 @@
             self.screens = screens = layouts[ l ][ c ]
         except KeyError:
             log.warning('Could not find screens for %d lines and %d columns 
LCD!' % ( self.height, self.width ))
-            print String(_( "ERROR" )) + ": " + String(_( "No screens found 
for this LCD (%dx%d)!" )) % ( self.height, self.width )
+            print to_str(_( "ERROR" )) + ": " + to_str(_( "No screens found 
for this LCD (%dx%d)!" )) % ( self.height, self.width )
             self.disable = 1
             return
         

Modified: trunk/ui/src/plugins/mbus.py
==============================================================================
--- trunk/ui/src/plugins/mbus.py        (original)
+++ trunk/ui/src/plugins/mbus.py        Fri Oct 27 18:33:23 2006
@@ -1,5 +1,6 @@
 # kaa imports
 from kaa.notifier import EventHandler, Timer
+from kaa.strutils import unicode_to_str
 import kaa.beacon
 
 # freevo core imports
@@ -65,7 +66,7 @@
         if not app or app.get_name() != 'menu':
             raise RuntimeError('freevo not in menu mode')
 
-        kaa.beacon.query(filename=String(file)).get(filter='extmap')
+        kaa.beacon.query(filename=unicode_to_str(file)).get(filter='extmap')
 
         # normal file
         for p in plugin.mimetype(type):

Modified: trunk/ui/src/sysconfig.py
==============================================================================
--- trunk/ui/src/sysconfig.py   (original)
+++ trunk/ui/src/sysconfig.py   Fri Oct 27 18:33:23 2006
@@ -31,7 +31,7 @@
 #
 # -----------------------------------------------------------------------------
 
-__all__ = [ 'CONF', 'Unicode', 'String', 'cachefile', 'datafile' ]
+__all__ = [ 'CONF', 'Unicode', 'cachefile', 'datafile' ]
 
 # Python imports
 import os
@@ -89,7 +89,6 @@
 
 # encoding helper functions
 Unicode = conf.Unicode
-String  = conf.String
 
 # helper functions to get dirs
 cachefile = conf.cachefile

Modified: trunk/ui/src/tv/program.py
==============================================================================
--- trunk/ui/src/tv/program.py  (original)
+++ trunk/ui/src/tv/program.py  Fri Oct 27 18:33:23 2006
@@ -36,6 +36,7 @@
 
 # kaa imports
 import kaa.epg
+from kaa.strutils import unicode_to_str
 
 # freevo core imports
 import freevo.ipc
@@ -94,7 +95,7 @@
         """
         return as string for debug
         """
-        return String(self.__unicode__())
+        return unicode_to_str(self.__unicode__())
 
 
     def __cmp__(self, other):

Modified: trunk/ui/src/video/videoitem.py
==============================================================================
--- trunk/ui/src/video/videoitem.py     (original)
+++ trunk/ui/src/video/videoitem.py     Fri Oct 27 18:33:23 2006
@@ -43,6 +43,9 @@
 import copy
 import logging
 
+# kaa imports
+from kaa.strutils import unicode_to_str
+
 # freevo imports
 import config
 import util
@@ -119,7 +122,7 @@
         if show_name:
             # This matches a tv show with a show name, an epsiode and
             # a title of the specific episode
-            sn = String(show_name[0].lower())
+            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:

Modified: trunk/webserver/src/base.py
==============================================================================
--- trunk/webserver/src/base.py (original)
+++ trunk/webserver/src/base.py Fri Oct 27 18:33:23 2006
@@ -32,7 +32,7 @@
 
 # kaa imports
 import kaa.epg
-from kaa.strutils import get_encoding
+from kaa.strutils import get_encoding, to_str
 
 # webserver imports
 import freevo.conf
@@ -225,7 +225,7 @@
             self.res += s
 
     def __str__(self):
-        return String(self.res)
+        return to_str(self.res)
 
     def send(self):
         data = str(self)

Modified: trunk/webserver/src/pages/recordings.py
==============================================================================
--- trunk/webserver/src/pages/recordings.py     (original)
+++ trunk/webserver/src/pages/recordings.py     Fri Oct 27 18:33:23 2006
@@ -85,7 +85,7 @@
                     prog = p
 
             if prog:
-                log.info('remove prog: %s' % String(prog))
+                log.info('remove prog: %s', prog)
                 tvserver.recordings.remove(prog.id)
                 progs = tvserver.recordings.wait_on_list()
 

-------------------------------------------------------------------------
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

Reply via email to