src/JsRender/NodeToGtk.vala
authorAlan Knowles <alan@roojs.com>
Tue, 12 May 2015 08:00:40 +0000 (16:00 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 12 May 2015 08:00:40 +0000 (16:00 +0800)
src/JsRender/NodeToGtk.vala

index 9e0048d..51bce79 100644 (file)
@@ -106,7 +106,7 @@ public class JsRender.NodeToGtk : Object {
                        print("SKIP - gtype is invalid\n");
                        return null;
                }
-               // if it's a window... 
+               // if it's a window...  -- things we can not render....
 
                if (cls_gtype.is_a(typeof(global::Gtk.Window))) {
                        // what if it has none...
@@ -115,6 +115,13 @@ public class JsRender.NodeToGtk : Object {
                        }
                        return this.mungeChild(this.node.items.get(0));
                }
+               if (cls_gtype.is_a(typeof(global::Gtk.Popover))) {
+                       // what if it has none...
+                       if (this.node.items.size < 1) {
+                               return null;
+                       }
+                       return this.mungeChild(this.node.items.get(0));
+               }
 
                var ret = Object.new(cls_gtype);
                ret.ref(); //??? problematic?