Update of /cvsroot/freevo/freevo/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3477

Modified Files:
        directory.py item.py playlist.py 
Log Message:
unicode fixes

Index: directory.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/directory.py,v
retrieving revision 1.119
retrieving revision 1.120
diff -C2 -d -r1.119 -r1.120
*** directory.py        21 Feb 2004 19:39:04 -0000      1.119
--- directory.py        23 Feb 2004 19:59:33 -0000      1.120
***************
*** 10,13 ****
--- 10,16 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.120  2004/02/23 19:59:33  dischi
+ # unicode fixes
+ #
  # Revision 1.119  2004/02/21 19:39:04  dischi
  # use new gui box for password
***************
*** 46,107 ****
  # include overlay in listdir
  #
- # Revision 1.107  2004/02/01 17:09:26  dischi
- # o add menuw to playlist for whole directory to show it when selected
- # o support for dirconfig in mimetype plugins
- #
- # Revision 1.106  2004/01/31 16:40:25  dischi
- # removed unneeded attr
- #
- # Revision 1.105  2004/01/27 19:17:48  dischi
- # fix crash when an item is added to an empty menu
- #
- # Revision 1.104  2004/01/26 20:56:24  dischi
- # do not crash when deleting last item
- #
- # Revision 1.103  2004/01/25 15:38:57  dischi
- # prevent endless checking for overlay change
- #
- # Revision 1.102  2004/01/24 19:57:24  dischi
- # check if dir exists
- #
- # Revision 1.101  2004/01/24 17:35:51  dischi
- # fix crash
- #
- # Revision 1.100  2004/01/20 09:58:09  dischi
- # fix directory update problem
- #
- # Revision 1.99  2004/01/19 20:29:11  dischi
- # cleanup, reduce cache size
- #
- # Revision 1.98  2004/01/18 21:10:51  dischi
- # first load fxd file, than call plugins
- #
- # Revision 1.97  2004/01/18 16:50:34  dischi
- # watcher improvements
- #
- # Revision 1.96  2004/01/17 21:29:01  dischi
- # bugfix
- #
- # Revision 1.95  2004/01/17 20:30:18  dischi
- # use new metainfo
- #
- # Revision 1.94  2004/01/11 04:04:37  outlyer
- # Ok,  now it shows the "Coming Up" list anywhere in the TV menu. I think
- # it fits, though it looks fairly ugly right now. I'm going to make it more
- # flexible after I get some listings for 'tomorrow' since mine expire tonight.
- #
- # I like this as a feature, but I'm wondering if someone has an idea on a
- # cleaner way to implement this. This is a little hackish, since "Coming Up"
- # isn't really a item "property" so it doesn't exactly fit in the object
- # model.
- #
- # I did remove it from directory.py, so that's at least more logical.
- #
- # Maybe we should have a general function in item.py to call extra
- # functions, or a way to embed python in the skin which isn't so nice.
- #
- # Ideally, we need a different way to have "default" information in an info
- # area, as opposed to putting it in the item.
- #
  # -----------------------------------------------------------------------
  # Freevo - A Home Theater PC framework
--- 49,52 ----
***************
*** 698,713 ****
              self.dir_items.sort(lambda l, o: util.smartsort(l.dir,o.dir))
          else:
!             self.dir_items.sort(lambda l, o: util.ucmp(l.dir.upper(), o.dir.upper()))
  
          # sort playlist
!         self.pl_items.sort(lambda l, o: util.ucmp(l.name.upper(), o.name.upper()))
  
          # sort normal items
          if self.DIRECTORY_SORT_BY_DATE:
!             self.play_items.sort(lambda l, o: util.ucmp(l.sort('date').upper(),
!                                                         o.sort('date').upper()))
          else:
!             self.play_items.sort(lambda l, o: util.ucmp(l.sort().upper(),
!                                                         o.sort().upper()))
  
          if self['num_dir_items'] != len(self.dir_items):
--- 643,657 ----
              self.dir_items.sort(lambda l, o: util.smartsort(l.dir,o.dir))
          else:
!             self.dir_items.sort(lambda l, o: cmp(l.dir.upper(), o.dir.upper()))
  
          # sort playlist
!         self.pl_items.sort(lambda l, o: cmp(l.name.upper(), o.name.upper()))
  
          # sort normal items
          if self.DIRECTORY_SORT_BY_DATE:
!             self.play_items.sort(lambda l, o: cmp(l.sort('date').upper(),
!                                                   o.sort('date').upper()))
          else:
!             self.play_items.sort(lambda l, o: cmp(l.sort().upper(), 
o.sort().upper()))
  
          if self['num_dir_items'] != len(self.dir_items):
***************
*** 904,908 ****
          # create new item with updated name
          item = copy.copy(menuw.menustack[-1].selected)
!         item.name = item.name[:item.name.find('\t') + 1] + 
self.configure_set_name(arg)
  
          try:
--- 848,852 ----
          # create new item with updated name
          item = copy.copy(menuw.menustack[-1].selected)
!         item.name = item.name[:item.name.find(u'\t') + 1] + 
self.configure_set_name(arg)
  
          try:

Index: item.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/item.py,v
retrieving revision 1.71
retrieving revision 1.72
diff -C2 -d -r1.71 -r1.72
*** item.py     23 Feb 2004 16:34:26 -0000      1.71
--- item.py     23 Feb 2004 19:59:34 -0000      1.72
***************
*** 10,13 ****
--- 10,16 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.72  2004/02/23 19:59:34  dischi
+ # unicode fixes
+ #
  # Revision 1.71  2004/02/23 16:34:26  dischi
  # better skin i18n support
***************
*** 34,114 ****
  # fix unicode handling
  #
- # Revision 1.63  2004/02/05 07:17:23  gsbarbieri
- # typo
- #
- # Revision 1.62  2004/02/05 05:44:26  gsbarbieri
- # Fixes some bugs related to handling unicode internally.
- # NOTE: Many of the bugs are related to using str() everywhere, so please stop doing 
that.
- #
- # Revision 1.61  2004/02/05 02:52:20  gsbarbieri
- # Handle filenames internally as unicode objects.
- #
- # This does *NOT* affect filenames that have only ASCII chars, since the
- # translation ASCII -> Unicode is painless. However this *DOES* affect files
- # with accents
- #
- # It determines the encoding based on (in order) FREEVO_LOCALE, LANG and
- # LC_ALL, which may have the form: "LANGUAGE_CODE.ENCODING",
- # like "pt_BR.UTF-8"
- #
- # Revision 1.60  2004/02/03 20:46:57  dischi
- # fix debug warning
- #
- # Revision 1.59  2004/02/01 19:47:13  dischi
- # some fixes by using new mmpython data
- #
- # Revision 1.58  2004/02/01 17:08:38  dischi
- # speedup, remove unneeded stuff
- #
- # Revision 1.57  2004/01/31 16:38:23  dischi
- # changes because of mediainfo changes
- #
- # Revision 1.56  2004/01/31 12:38:47  dischi
- # remove \0 checking, fixed mmpython
- #
- # Revision 1.55  2004/01/30 20:42:59  dischi
- # fix name setting
- #
- # Revision 1.54  2004/01/24 19:14:21  dischi
- # clean up autovar handling
- #
- # Revision 1.53  2004/01/19 20:29:11  dischi
- # cleanup, reduce cache size
- #
- # Revision 1.52  2004/01/18 16:50:10  dischi
- # (re)move unneeded variables
- #
- # Revision 1.51  2004/01/17 20:30:18  dischi
- # use new metainfo
- #
- # Revision 1.50  2004/01/14 01:18:45  outlyer
- # Workaround some weirdness... for some reason these should be of type None, but
- # are instead the string "None" which doesn't help, since the string "None" is
- # a valid string and hence not actually type None
- #
- # I don't think anyone who doesn't know python understands what the heck I
- # just said.
- #
- # Revision 1.49  2004/01/11 10:57:28  dischi
- # remove coming up here, it is no item attr
- #
- # Revision 1.48  2004/01/11 04:04:37  outlyer
- # Ok,  now it shows the "Coming Up" list anywhere in the TV menu. I think
- # it fits, though it looks fairly ugly right now. I'm going to make it more
- # flexible after I get some listings for 'tomorrow' since mine expire tonight.
- #
- # I like this as a feature, but I'm wondering if someone has an idea on a
- # cleaner way to implement this. This is a little hackish, since "Coming Up"
- # isn't really a item "property" so it doesn't exactly fit in the object
- # model.
- #
- # I did remove it from directory.py, so that's at least more logical.
- #
- # Maybe we should have a general function in item.py to call extra
- # functions, or a way to embed python in the skin which isn't so nice.
- #
- # Ideally, we need a different way to have "default" information in an info
- # area, as opposed to putting it in the item.
- #
  # -----------------------------------------------------------------------
  # Freevo - A Home Theater PC framework
--- 37,40 ----
***************
*** 343,347 ****
                  if val == value:
                      if not self.delete_info(key):
!                         _debug_('unable to store info for \'%s\'' % self.name, 0)
                  else:
                      self.store_info(key, value)
--- 269,273 ----
                  if val == value:
                      if not self.delete_info(key):
!                         _debug_(u'unable to store info for \'%s\'' % self.name, 0)
                  else:
                      self.store_info(key, value)
***************
*** 356,362 ****
          if isinstance(self.info, mediainfo.Info):
              if not self.info.store(key, value):
!                 _debug_('unable to store info for \'%s\'' % self.name, 0)
          else:
!             _debug_('unable to store info for that kind of item \'%s\'' % self.name, 
0)
  
  
--- 282,288 ----
          if isinstance(self.info, mediainfo.Info):
              if not self.info.store(key, value):
!                 _debug_(u'unable to store info for \'%s\'' % self.name, 0)
          else:
!             _debug_(u'unable to store info for that kind of item \'%s\'' % 
self.name, 0)
  
  
***************
*** 385,389 ****
          Returns the string how to sort this item
          """
!         return '0%s' % self.name
  
      
--- 311,315 ----
          Returns the string how to sort this item
          """
!         return u'0%s' % self.name
  
      

Index: playlist.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/playlist.py,v
retrieving revision 1.65
retrieving revision 1.66
diff -C2 -d -r1.65 -r1.66
*** playlist.py 19 Feb 2004 04:57:56 -0000      1.65
--- playlist.py 23 Feb 2004 19:59:34 -0000      1.66
***************
*** 10,13 ****
--- 10,16 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.66  2004/02/23 19:59:34  dischi
+ # unicode fixes
+ #
  # Revision 1.65  2004/02/19 04:57:56  gsbarbieri
  # Support Web Interface i18n.
***************
*** 148,152 ****
          self.type     = 'playlist'
          self.menuw    = None
!         self.name     = name
  
          if (isinstance(playlist, str) or isinstance(playlist, unicode)) and not name:
--- 151,155 ----
          self.type     = 'playlist'
          self.menuw    = None
!         self.name     = Unicode(name)
  
          if (isinstance(playlist, str) or isinstance(playlist, unicode)) and not name:
***************
*** 271,275 ****
                      for i in p.get(self, [os.path.join(curdir, ss_name[0])]):
                          if i.type == 'image':
!                             i.name     = ss_caption[0]
                              i.duration = int(ss_delay[0])
                              self.playlist.append(i)
--- 274,278 ----
                      for i in p.get(self, [os.path.join(curdir, ss_name[0])]):
                          if i.type == 'image':
!                             i.name     = Unicode(ss_caption[0])
                              i.duration = int(ss_delay[0])
                              self.playlist.append(i)



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to