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:
e84d77c
)
xobj fixes
author
Alan Knowles
<alan@akbkhome.com>
Mon, 2 Jul 2012 12:56:11 +0000
(20:56 +0800)
committer
Alan Knowles
<alan@akbkhome.com>
Mon, 2 Jul 2012 12:56:11 +0000
(20:56 +0800)
XObjectBase/GtkTreeView.js
patch
|
blob
|
history
diff --git
a/XObjectBase/GtkTreeView.js
b/XObjectBase/GtkTreeView.js
index
07cfc8e
..
1f77cd1
100644
(file)
--- a/
XObjectBase/GtkTreeView.js
+++ b/
XObjectBase/GtkTreeView.js
@@
-10,27
+10,31
@@
GObject = imports.gi.GObject;
GtkTreeView = XObject.define(
function(cfg)
{
GtkTreeView = XObject.define(
function(cfg)
{
- this.xconfig = {
- font : cfg.font || false,
- drag_source : cfg.drag_source || false,
- drag_dest : cfg.drag_dest || false
- };
- for (var i in this.xconfig) {
- if (typeof(cfg[i]) != 'undefined') {
- delete cfg[i];
- }
- }
+ var clean_cfg = XObject.extend({
+ font : false,
+ drag_source : false,
+ drag_dest : false //,
+ // selection : false,
+ }, cfg);
+
+ delete clean_cfg.font;
+ delete clean_cfg.selection;
+ delete clean_cfg.drag_source;
+ delete clean_cfg.drag_dest;
+
+
+ XObject.call(this, clean_cfg);
+
+ this.config = cfg;
- XObject.call(this, cfg);
// this is an example...
},
XObject,
{
// this is an example...
},
XObject,
{
- xconfig : false,
selection : false,
init : function()
selection : false,
init : function()
@@
-38,17
+42,20
@@
GtkTreeView = XObject.define(
XObject.prototype.init.call(this);
XObject.prototype.init.call(this);
- /*
- if (this.xconfig.font) {
+
+
+
+
+ if (this.config.font) {
var description = new Pango.FontDescription.c_new();
var description = new Pango.FontDescription.c_new();
- description.set_size(this.
x
config.font.size);
+ description.set_size(this.config.font.size);
this.el.modify_font(description);
}
this.el.modify_font(description);
}
- if (this.
x
config.drag_source) {
- var ds = this.
x
config.drag_source;
+ if (this.config.drag_source) {
+ var ds = this.config.drag_source;
this.el.drag_source_set( // widget will be drag-able
ds.modifier, //Gdk.ModifierType.BUTTON1_MASK, // modifier that will start a drag
this.el.drag_source_set( // widget will be drag-able
ds.modifier, //Gdk.ModifierType.BUTTON1_MASK, // modifier that will start a drag
@@
-65,9
+72,9
@@
GtkTreeView = XObject.define(
this.el.drag_source_add_text_targets();
}
this.el.drag_source_add_text_targets();
}
- if (this.
x
config.drag_dest) {
+ if (this.config.drag_dest) {
- var ds = this.
x
config.drag_dest;
+ var ds = this.config.drag_dest;
this.el.drag_dest_set
(
this.el.drag_dest_set
(
@@
-84,7
+91,7
@@
GtkTreeView = XObject.define(
);
this.el.drag_dest_add_text_targets();
}
);
this.el.drag_dest_add_text_targets();
}
- */
+
}
}
@@
-94,9
+101,9
@@
GtkTreeView = XObject.define(
);
GtkTreeView.config = {
);
GtkTreeView.config = {
- selection : {
- type : 'Gtk.TreeSelection'
- },
+ //selection : { << just need to add a treeselection..
+
//
type : 'Gtk.TreeSelection'
+
//
},
font : {
type : 'Pango.FontDescription'
},
font : {
type : 'Pango.FontDescription'
},