projects
/
gitlive
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7ecbab9
)
NewBranch.bjs
author
Alan Knowles
<alan@roojs.com>
Wed, 31 Oct 2018 05:04:22 +0000
(13:04 +0800)
committer
Alan Knowles
<alan@roojs.com>
Wed, 31 Oct 2018 05:04:22 +0000
(13:04 +0800)
NewBranch.vala
NewBranch.bjs
patch
|
blob
|
history
NewBranch.vala
patch
|
blob
|
history
diff --git
a/NewBranch.bjs
b/NewBranch.bjs
index
ff3cc48
..
990ead6
100644
(file)
--- a/
NewBranch.bjs
+++ b/
NewBranch.bjs
@@
-31,6
+31,7
@@
"bool homogeneous" : false,
"* pack" : "pack_start,false,false,0",
"xtype" : "Table",
"bool homogeneous" : false,
"* pack" : "pack_start,false,false,0",
"xtype" : "Table",
+ "uint column_spacing" : 2,
"n_columns" : 2,
"$ xns" : "Gtk",
"n_rows" : 2,
"n_columns" : 2,
"$ xns" : "Gtk",
"n_rows" : 2,
@@
-47,6
+48,9
@@
"$ xns" : "Gtk"
},
{
"$ xns" : "Gtk"
},
{
+ "listeners" : {
+ "changed" : "() => {\n\n\tValue val1;\n\tValue val2;\n \n\tthis.el.get_active_iter (out iter);\n\t_this.dbmodel.get_value (iter, 0, out val1);\n\t_this.dbmodellist_store.get_value (iter, 1, out val2);\n\n\tprint (\"Selection: %s, %d\\n\", (string) val1, (int) val2);\n}"
+ },
"id" : "build_module",
"* init" : "this.el.add_attribute(_this.dbcellrenderer.el , \"markup\", 1 );",
"* pack" : "attach_defaults,1,2,0,1",
"id" : "build_module",
"* init" : "this.el.add_attribute(_this.dbcellrenderer.el , \"markup\", 1 );",
"* pack" : "attach_defaults,1,2,0,1",
diff --git
a/NewBranch.vala
b/NewBranch.vala
index
a2e6011
..
61de69f
100644
(file)
--- a/
NewBranch.vala
+++ b/
NewBranch.vala
@@
-118,6
+118,7
@@
public class NewBranch : Object
// set gobject values
this.el.margin = 2;
// set gobject values
this.el.margin = 2;
+ this.el.column_spacing = 2;
var child_0 = new Xcls_Label4( _this );
child_0.ref();
this.el.attach_defaults ( child_0.el , 0,1,0,1 );
var child_0 = new Xcls_Label4( _this );
child_0.ref();
this.el.attach_defaults ( child_0.el , 0,1,0,1 );
@@
-187,6
+188,19
@@
public class NewBranch : Object
// init method
this.el.add_attribute(_this.dbcellrenderer.el , "markup", 1 );
// init method
this.el.add_attribute(_this.dbcellrenderer.el , "markup", 1 );
+
+ //listeners
+ this.el.changed.connect( () => {
+
+ Value val1;
+ Value val2;
+
+ this.el.get_active_iter (out iter);
+ _this.dbmodel.get_value (iter, 0, out val1);
+ _this.dbmodellist_store.get_value (iter, 1, out val2);
+
+ print ("Selection: %s, %d\n", (string) val1, (int) val2);
+ });
}
// user defined functions
}
// user defined functions