add the name of missing skin element to debug output
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Fri, 14 Sep 2007 11:27:41 +0000 (11:27 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Fri, 14 Sep 2007 11:27:41 +0000 (11:27 +0000)
lib/python/Components/GUIComponent.py
lib/python/Components/GUISkin.py

index 401a004da350b9f5bd1fc1988b2cb827d2573850..c900796d566fd3a559e82f823cdab9b8fd417041 100644 (file)
@@ -31,10 +31,10 @@ class GUIComponent(object):
                        self.instance.hide()
                
                if self.skinAttributes is None:
-                       print "warning, skin is missing some elements."
-                       return
+                       return False
 
                skin.applyAllAttributes(self.instance, desktop, self.skinAttributes)
+               return True
 
        def move(self, x, y = None):
                # we assume, that x is already an ePoint
index 0fb94214ff4c7529cea3c53f5e6104bd2d3aa912..39499c77ef16f9feac914f7a7f159fce889c990b 100644 (file)
@@ -10,10 +10,18 @@ class GUISkin:
                self.summaries = CList()
 
        def createGUIScreen(self, parent, desktop):
-               for val in self.values() + self.renderer:
+               for val in self.renderer:
                        if isinstance(val, GUIComponent):
                                val.GUIcreate(parent)
-                               val.applySkin(desktop)
+                               if not val.applySkin(desktop):
+                                       print "warning, skin is missing renderer", val, "in", self
+
+               for key in self:
+                       val = self[key]
+                       if isinstance(val, GUIComponent):
+                               val.GUIcreate(parent)
+                               if not val.applySkin(desktop):
+                                       print "warning, skin is missing element", key, "in", self
 
                for w in self.additionalWidgets:
                        w.instance = w.widget(parent)