fix UI initialization, it runs, baby\!
authorvisnov <visnov@e0cc52ee-31ee-0310-8b87-e83c4596d67c>
Tue, 13 Nov 2007 08:50:00 +0000 (08:50 +0000)
committervisnov <visnov@e0cc52ee-31ee-0310-8b87-e83c4596d67c>
Tue, 13 Nov 2007 08:50:00 +0000 (08:50 +0000)
git-svn-id: http://svn.opensuse.org/svn/yast/branches/tmp/sh/mod-ui/web-wt@41992 e0cc52ee-31ee-0310-8b87-e83c4596d67c

src/Y2CCWeb.h

index bf08663..bfbed5f 100644 (file)
@@ -50,10 +50,17 @@ public:
      */
     Y2Component *create(const char * name) const
     {
-       if (!strcmp(name, "web") )
-           return new YWebUIComponent();
-       else
-           return 0;
+        if (!strcmp(name, "web") )
+        {
+            Y2Component* ret = YUIComponent::uiComponent ();
+            if (!ret || ret->name () != name)
+            {
+                ret = new YWebUIComponent();
+            }
+            return ret;
+        }
+        else
+            return 0;
     }
 };