X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=src%2FJsRender%2FNodeToVala.vala;h=6490629e2807d559e5a356b1663675d3398591b0;hb=ee48badb20ee4af798c32c9b02bb5feb75d42beb;hp=5791c99aef060a2966731fed87c4168fa85cc0d0;hpb=c2fe6243f41b0b37f506607242a2d74c80e5127f;p=roobuilder diff --git a/src/JsRender/NodeToVala.vala b/src/JsRender/NodeToVala.vala index 5791c99ae..6490629e2 100644 --- a/src/JsRender/NodeToVala.vala +++ b/src/JsRender/NodeToVala.vala @@ -417,15 +417,15 @@ public abstract class JsRender.NodeToVala : NodeWriter { if (this.node.fqn() == "Gtk.NotebookPage") { switch (child.get_prop("* prop").val) { case "child": - nb_child = childname; + nb_child = childname + (this.this_el == "this.el." ? ".el" : ""); break; case "tab": - nb_tab = childname; + nb_tab = childname + (this.this_el == "this.el." ? ".el" : ""); break; case "menu": - nb_menu = childname; + nb_menu = childname + (this.this_el == "this.el." ? ".el" : ""); break; } continue; @@ -467,19 +467,21 @@ public abstract class JsRender.NodeToVala : NodeWriter { GLib.debug("got node %s with nb_child= %s", this.node.fqn() , nb_child); if (this.node.fqn() == "Gtk.NotebookPage" && nb_child != "") { + var nb = (this.this_el == "this.el." ? "notebook.el" : "notebook"); + if (nb_tab == "" && this.node.has("tab_label")) { nb_tab = "new Gtk.Label(this.tab_label)"; } if (nb_menu == "" && nb_tab == "") { - this.addLine(@"$(ipad)notebook.el.append_page( $(nb_child) );"); + this.addLine(@"$(ipad)$(nb).append_page( $(nb_child) );"); return; } if (nb_menu == "") { - this.addLine(@"$(ipad)notebook.el.append_page( $(nb_child) , $(nb_tab) );"); + this.addLine(@"$(ipad)$(nb).append_page( $(nb_child) , $(nb_tab) );"); return; } - this.addLine(@"$(ipad)notebook.el.append_page_menu( $(nb_child) , $(nb_tab), $(nb_menu) );"); + this.addLine(@"$(ipad)$(nb).append_page_menu( $(nb_child) , $(nb_tab), $(nb_menu) );"); }