projects
/
app.Builder.js
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
63dfb74
)
Sample/DialogTemplateSelect.js
author
Alan Knowles
<alan@akbkhome.com>
Mon, 7 Jun 2010 08:21:06 +0000
(16:21 +0800)
committer
Alan Knowles
<alan@akbkhome.com>
Mon, 7 Jun 2010 08:21:06 +0000
(16:21 +0800)
Sample/DialogTemplateSelect.js
patch
|
blob
|
history
diff --git
a/Sample/DialogTemplateSelect.js
b/Sample/DialogTemplateSelect.js
index
ecc886d
..
64ebf8b
100644
(file)
--- a/
Sample/DialogTemplateSelect.js
+++ b/
Sample/DialogTemplateSelect.js
@@
-35,7
+35,7
@@
DialogTemplateSelect=new XObject({
this.el.show_all();
this.el.run();
this.el.hide();
this.el.show_all();
this.el.run();
this.el.hide();
- var ix = this.el.get_active();
+ var ix = this.
get('combo').
el.get_active();
if (ix < 1 ) {
return node;
}
if (ix < 1 ) {
return node;
}
@@
-67,7
+67,7
@@
DialogTemplateSelect=new XObject({
pack : "add",
init : function() {
XObject.prototype.init.call(this);
pack : "add",
init : function() {
XObject.prototype.init.call(this);
- this.el.add_attribute(this.items[0].el , 'markup', 1 );
+ this.el.add_attribute(this.items[0].el , 'markup', 1 );
},
items : [
{
},
items : [
{
@@
-78,12
+78,21
@@
DialogTemplateSelect=new XObject({
xtype: Gtk.ListStore,
id : "model",
pack : "set_model",
xtype: Gtk.ListStore,
id : "model",
pack : "set_model",
+ init : function() {
+ XObject.prototype.init.call(this);
+ this.el.set_column_types ( 2, [
+ GObject.TYPE_STRING, // real key
+ GObject.TYPE_STRING // real type
+
+
+ ] );
+ },
loadData : function (data) {
this.el.clear();
var iter = new Gtk.TreeIter();
var el = this.el;
data.forEach(function(p,i) {
loadData : function (data) {
this.el.clear();
var iter = new Gtk.TreeIter();
var el = this.el;
data.forEach(function(p,i) {
-
+ print("add " + p);
el.append(iter);
el.append(iter);