Author: dmeyer
Date: Sun Apr 15 08:21:29 2007
New Revision: 9448

Modified:
   trunk/ui/src/directory.py
   trunk/ui/src/menu/item.py
   trunk/ui/src/playlist.py

Log:
make it possible to declare class type variable

Modified: trunk/ui/src/directory.py
==============================================================================
--- trunk/ui/src/directory.py   (original)
+++ trunk/ui/src/directory.py   Sun Apr 15 08:21:29 2007
@@ -143,9 +143,10 @@
     """
     class for handling directories
     """
+    type = 'dir'
+
     def __init__(self, directory, parent, name = '', type = None):
         Playlist.__init__(self, parent=parent, type=type)
-        self.type = 'dir'
         self.item_menu  = None
 
         if not isinstance(directory, kaa.beacon.Item):

Modified: trunk/ui/src/menu/item.py
==============================================================================
--- trunk/ui/src/menu/item.py   (original)
+++ trunk/ui/src/menu/item.py   Sun Apr 15 08:21:29 2007
@@ -55,6 +55,8 @@
     Item class. This is the base class for all items in the menu. It's a
     template for other info items like VideoItem, AudioItem and ImageItem
     """
+    type = None
+    
     def __init__(self, parent=None, action=None, type=None):
         """
         Init the item. Sets all needed variables, if parent is given also
@@ -63,7 +65,8 @@
         self.icon = None
         self.info = {}
         self.menu = None
-        self.type = type
+        if type is not None:
+            self.type = type
         self._image = None
 
         self.action = action

Modified: trunk/ui/src/playlist.py
==============================================================================
--- trunk/ui/src/playlist.py    (original)
+++ trunk/ui/src/playlist.py    Sun Apr 15 08:21:29 2007
@@ -62,7 +62,9 @@
     REPEAT_ITEM     = 1
     REPEAT_PLAYLIST = 2
 
-    def __init__(self, name='', playlist=[], parent=None, type=None,
+    type = 'playlist'
+    
+    def __init__(self, name='', playlist=[], parent=None,
                  random=False, autoplay=False, repeat=REPEAT_OFF):
         """
         Init the playlist

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to