"$ xns" : "Gtk",
"* prop" : "buttons[]",
"* response_id" : 1,
- "string label" : "Label",
+ "string label" : "xxxx",
"xtype" : "Button"
},
{
"$ xns" : "Gtk",
"Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
"int spacing" : 0,
- "items" : [
- {
- "$ Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
- "$ xns" : "Gtk",
- "items" : [
- {
- "$ xns" : "Gtk",
- "string label" : "Label",
- "xtype" : "Button"
- }
- ],
- "listeners" : {
- "delete_event" : [
- "(event) => {",
- "",
- "\treturn bool;",
- "}",
- ""
- ]
- },
- "xtype" : "ButtonBox",
- "| void test1" : [
- "() {",
- "",
- "}"
- ]
- }
- ],
"xtype" : "Box"
}
],
// my vars (dec)
// set gobject values
- this.el.label = "Label";
+ this.el.label = "xxxx";
}
// user defined functions
// my vars (dec)
// set gobject values
- var child_0 = new Xcls_ButtonBox6( _this );
- child_0.ref();
- this.el.add( child_0.el );
- }
-
- // user defined functions
- }
- public class Xcls_ButtonBox6 : Object
- {
- public Gtk.ButtonBox el;
- private GladeView _this;
-
-
- // my vars (def)
-
- // ctor
- public Xcls_ButtonBox6(GladeView _owner )
- {
- _this = _owner;
- this.el = new Gtk.ButtonBox( Gtk.Orientation.HORIZONTAL );
-
- // my vars (dec)
-
- // set gobject values
- var child_0 = new Xcls_Button7( _this );
- child_0.ref();
- this.el.add( child_0.el );
-
- //listeners
- this.el.delete_event.connect( (event) => {
-
- return bool;
- });
- }
-
- // user defined functions
- public void test1 () {
-
- }
- }
- public class Xcls_Button7 : Object
- {
- public Gtk.Button el;
- private GladeView _this;
-
-
- // my vars (def)
-
- // ctor
- public Xcls_Button7(GladeView _owner )
- {
- _this = _owner;
- this.el = new Gtk.Button();
-
- // my vars (dec)
-
- // set gobject values
- this.el.label = "Label";
}
// user defined functions
}
-
-
}
" ",
" ",
" ",
- "// load children - if it has any..",
+ "\t\t// load children - if it has any..",
" ",
" if (node.items.size > 0) {",
" this.load(node.items, n_iter);",
" var node = this.pathToNode(mod.get_path(old_iter).to_string());",
" //console.dump(node);",
" if (node == null) {",
- " print(\"moveNode: ERROR - node is null?\");",
+ " GLib.debug(\"moveNode: ERROR - node is null?\");",
" }",
" ",
" ",
"",
" ",
" if ((action & Gdk.DragAction.MOVE) > 0) {",
- " print(\"REMOVING OLD NODE : \" + target_data + \"\\n\");",
+ " GLib.debug(\"REMOVING OLD NODE : \" + target_data + \"\\n\");",
" node.remove();",
" this.dropNode(target_data, node, false);",
" this.el.remove(ref old_iter);",
" ",
" ",
" } else {",
- " print(\"DROPPING NODE // copy: \" + target_data + \"\\n\");",
+ " GLib.debug(\"DROPPING NODE // copy: \" + target_data + \"\\n\");",
" node = node.deepClone();",
" this.dropNode(target_data, node, false);",
" }",
{
_this = _owner;
_this.model = this;
- this.el = new Gtk.TreeStore( 4, typeof(string),typeof(string),typeof(Object),typeof(Gdk.Pixbuf) );
+ this.el = new Gtk.TreeStore.newv( { typeof(string),typeof(string),typeof(Object),typeof(Gdk.Pixbuf) } );
// my vars (dec)
this.template_select = null;
- // load children - if it has any..
+ // load children - if it has any..
if (node.items.size > 0) {
this.load(node.items, n_iter);
var node = this.pathToNode(mod.get_path(old_iter).to_string());
//console.dump(node);
if (node == null) {
- print("moveNode: ERROR - node is null?");
+ GLib.debug("moveNode: ERROR - node is null?");
}
if ((action & Gdk.DragAction.MOVE) > 0) {
- print("REMOVING OLD NODE : " + target_data + "\n");
+ GLib.debug("REMOVING OLD NODE : " + target_data + "\n");
node.remove();
this.dropNode(target_data, node, false);
this.el.remove(ref old_iter);
} else {
- print("DROPPING NODE // copy: " + target_data + "\n");
+ GLib.debug("DROPPING NODE // copy: " + target_data + "\n");
node = node.deepClone();
this.dropNode(target_data, node, false);
}
}
public void loadFromJson(Json.Object obj, int version) {
+
obj.foreach_member((o , key, value) => {
//print(key+"\n");
if (key == "items") {
var rkey = key;
var sval = this.jsonNodeAsString(value);
+
if (version == 1) {
rkey = this.upgradeKey(key, sval);
}
var n = new NodeProp.from_json(rkey, sval);
this.props.set(n.to_index_key(), n );
-
+
});
+
+
if (this.child_defaults.has_key(parent.fqn())) {
foreach(var k in this.child_defaults.get(parent.fqn())) {
- child.set_prop(k.dupe());
+ if (!child.has(k.to_index_key())) {
+ child.set_prop(k.dupe());
+ }
}
}
}
if (this.node_defaults.has_key(child.fqn())) {
foreach(var k in this.node_defaults.get(child.fqn())) {
- GLib.print("Adding Property %s", k.to_tooltip());
- child.set_prop(k.dupe());
+
+ if (!child.has(k.to_index_key())) {
+ GLib.debug("Adding Property %s", k.to_tooltip());
+ child.set_prop(k.dupe());
+ }
}
}