Multiple instance support.
[drlaunch] / src / icons.py
index 9c344ee..015273b 100755 (executable)
@@ -22,7 +22,7 @@
 
 __version__ = "$Id: 0.py 2265 2010-02-21 19:16:26Z v13 $"
 
-import config
+#import config
 import apps
 import icon
 from icon import getIcon, Icon
@@ -42,22 +42,23 @@ class IconIter:
        return(ret)
 
 class Icons(gobject.GObject):
-    def __init__(self, isconfig):
+    def __init__(self, isconfig, config):
        self.__gobject_init__()
        self.icons={}
        self.allicons={}
        self.size=0
        self.isconfig=isconfig
+       self.config=config
 
        # signal handlers
        self.h={}
 
        # setup allicons
-       maxsz=config.getMaxSize()
+       maxsz=self.config.getMaxSize()
        for x in xrange(maxsz[0]):
            for y in xrange(maxsz[1]):
                k=(x,y)
-               ico=Icon(self.isconfig)
+               ico=Icon(self.isconfig, self.config)
                self.allicons[k]=ico
                self.connect_one(ico)
 
@@ -143,8 +144,8 @@ class Icons(gobject.GObject):
 #          'tecnoballz', 'ncalc', 'rtcom-call-ui', 'rtcom-messaging-ui',
 #          'extcalllog', 'browser', 'modest', 'osso-addressbook']
 
-       wapps=config.getApps()
-       sz=config.getSize()
+       wapps=self.config.getApps()
+       sz=self.config.getSize()
 
        for k in wapps:
            x,y=k
@@ -155,7 +156,7 @@ class Icons(gobject.GObject):
            if appname!=None:
                app=apps.readOne(appname)
                if app!=None:
-                   app['icon2']=getIcon(app['icon'])
+                   app['icon2']=getIcon(app['icon'], self.config.getIconSize())
                    self.get(x,y).setApp(app)
            else:
                self.get(x,y).setApp(None)