Author: dmeyer
Date: Mon Jan 29 12:41:42 2007
New Revision: 9065

Removed:
   trunk/ui/src/util/cache.py
Modified:
   trunk/ui/src/gui/areas/handler.py
   trunk/ui/src/gui/theme.py
   trunk/ui/src/util/__init__.py

Log:
remove cache system, not needed anymore

Modified: trunk/ui/src/gui/areas/handler.py
==============================================================================
--- trunk/ui/src/gui/areas/handler.py   (original)
+++ trunk/ui/src/gui/areas/handler.py   Mon Jan 29 12:41:42 2007
@@ -53,7 +53,6 @@
 
 # freevo imports
 import config
-import util.cache
 from kaa.weakref import weakref
 
 # gui imports
@@ -109,14 +108,7 @@
             # Use a weakref to avoid memory problems.
             a.set_screen(weakref(self))
             
-        self.storage_file = freevo.conf.cachefile('skin', True)
         self.display_style['menu'] = 0
-        if os.path.isfile(self.storage_file):
-            self.storage = util.cache.load(self.storage_file)
-            if self.storage and self.storage.has_key(config.GUI_XML_FILE):
-                self.display_style['menu'] = self.storage[config.GUI_XML_FILE]
-       else:
-           self.storage = None
 
 
     def __del__(self):
@@ -132,35 +124,6 @@
         self.container = None
 
         
-    def toggle_display_style(self, menu):
-        """
-        Toggle display style
-        """
-        theme = gui.theme.get()
-
-        if isinstance(menu, str):
-            if not self.display_style.has_key(menu):
-                self.display_style[menu] = 0
-            self.display_style[menu] = (self.display_style[menu] + 1) % \
-                                       len(theme.sets[menu].style)
-            return
-            
-        if theme.special_menu.has_key(menu.type):
-            area = theme.special_menu[menu.type]
-        else:
-            area = theme.default_menu['default']
-
-        if self.display_style['menu'] >=  len(area.style):
-            self.display_style['menu'] = 0
-        self.display_style['menu'] = (self.display_style['menu'] + 1) % \
-                                     len(area.style)
-
-        if self.storage and self.storage.has_key(config.GUI_XML_FILE):
-            self.storage[config.GUI_XML_FILE] = self.display_style['menu']
-            util.cache.save(self.storage_file, self.storage)
-
-
-
     def __scan_for_text_view(self, menu):
         """
         scan if we have to fall back to text view. This will be done if some

Modified: trunk/ui/src/gui/theme.py
==============================================================================
--- trunk/ui/src/gui/theme.py   (original)
+++ trunk/ui/src/gui/theme.py   Mon Jan 29 12:41:42 2007
@@ -1453,22 +1453,8 @@
     from the public functions at the top of this file
     """
     global current_theme
-    cachefile = freevo.conf.cachefile('skin', True)
-    storage = {}
-    if os.path.isfile(cachefile):
-        storage = util.cache.load(cachefile)
-        if storage and not storage.has_key('GUI_XML_FILE'):
-            # storage file too old
-            storage = {}
-    if storage:
-        if not config.GUI_XML_FILE:
-            config.GUI_XML_FILE = storage['GUI_XML_FILE']
-        else:
-            log.debug('skin forced to %s' % config.GUI_XML_FILE)
-    else:
-        if not config.GUI_XML_FILE:
-            config.GUI_XML_FILE = config.GUI_DEFAULT_XML_FILE
-        storage = {}
+    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/util/__init__.py
==============================================================================
--- trunk/ui/src/util/__init__.py       (original)
+++ trunk/ui/src/util/__init__.py       Mon Jan 29 12:41:42 2007
@@ -29,4 +29,3 @@
 # -----------------------------------------------------------------------------
 
 from misc import *
-import cache

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

Reply via email to