Add prefs2 variable / remove vars

The prefs2 structure is where I will store my new tree-based
preferences.  I'll use this for now until everything gets moved over.  I
also remove the vars variable since nothing uses it.
This commit is contained in:
Bryan Schumaker 2010-11-14 17:29:31 -05:00
parent 5594825502
commit 8fb2b45ac8
1 changed files with 4 additions and 9 deletions

View File

@ -12,13 +12,13 @@ if __dev__ == True:
import event import event
import path import path
from trees import Tree, PersPrefTree
from map import Map from map import Map
from cache import Cache from cache import Cache
# Variables are not saved across sessions, but preferences are
# The cache is also saved across sessions # The cache is also saved across sessions
vars = None
prefs = None prefs = None
prefs2 = None
cache = Cache() cache = Cache()
plugin = None plugin = None
@ -28,13 +28,13 @@ lastfm = None
# Initialize helpful variables # Initialize helpful variables
def init(): def init():
global vars
global prefs global prefs
global prefs2
global audio global audio
global lastfm global lastfm
vars = Map()
prefs = Map("preferences") prefs = Map("preferences")
prefs2 = PersPrefTree("preferences")
import audio import audio
import lastfm import lastfm
@ -47,11 +47,6 @@ def init_pref(key, value):
if prefs.get(key, None) == None: if prefs.get(key, None) == None:
prefs[key] = value prefs[key] = value
def init_var(key, value):
global vars
if vars.get(key, None) == None:
vars[key] = value
def startup(): def startup():
global plugin global plugin