3 Pango = imports.gi.Pango;
4 GLib = imports.gi.GLib;
6 GObject = imports.gi.GObject;
7 GtkSource = imports.gi.GtkSource;
8 WebKit = imports.gi.WebKit;
10 GtkClutter = imports.gi.GtkClutter;
12 console = imports.console;
13 XObject = imports.XObject.XObject;
17 destroy_event : function (self, event) {
21 response : function (self, id) {
27 if (!this.get('bug').getValue().length) {
34 var val = this.get('bug').getValue();
41 title : "Project Properties",
50 /*[ 'xtype' ].forEach(function(k) {
51 _this.get(k).setValue(typeof(c[k]) == 'undefined' ? '' : c[k]);
56 //this.success = c.success;
61 pack : function(p,e) {
62 p.el.get_content_area().add(e.el)
67 pack : "pack_start,false,true,3",
71 label : "Select Active Bug:",
72 pack : "pack_start,false,true,3"
77 changed : function (self) {
78 var d = this.getValue();
79 this.get('/view').load(d.description);
83 pack : "pack_end,true,true,3",
84 getValue : function() {
85 var ix = this.el.get_active();
89 return this.get('model').data[ix];
92 XObject.prototype.init.call(this);
93 this.el.add_attribute(this.items[0].el , 'markup', 1 );
95 setValue : function(v)
99 this.get('model').data.forEach(function(n, ix) {
108 xtype: Gtk.CellRendererText,
112 xtype: Gtk.ListStore,
116 XObject.prototype.init.call(this);
118 this.el.set_column_types ( 2, [
119 GObject.TYPE_STRING, // real key
120 GObject.TYPE_STRING // real type
124 var Tickets = imports.Tickets.Tickets;
126 this.data = Tickets.fetchBugs("http://www.roojs.com/mtrack/index.php/Gitlive/web.hex");
128 { xtype: 'Roo', desc : "Roo Project" },
129 { xtype: 'Gtk', desc : "Gtk Project" },
130 //{ xtype: 'JS', desc : "Javascript Class" }
133 this.loadData(this.data);
136 loadData : function (data) {
138 var iter = new Gtk.TreeIter();
140 data.forEach(function(p) {
145 el.set_value(iter, 0, p.id);
146 el.set_value(iter, 1, '#' + p.id + ' - ' + p.summary );
158 xtype: Gtk.ScrolledWindow,
170 XObject.prototype.init.call(this);
171 var description = Pango.Font.description_from_string("monospace")
172 description.set_size(8000);
173 this.el.modify_font(description);
176 load : function(str) {
178 // show the help page for the active node..
183 this.el.get_buffer().set_text(str, str.length);
186 var buf = this.el.get_buffer();
191 show_line_numbers : true,
194 xtype: GtkSource.Buffer,
196 changed : function (self) {
198 var s = new Gtk.TextIter();
199 var e = new Gtk.TextIter();
200 this.el.get_start_iter(s);
201 this.el.get_end_iter(e);
202 var str = this.el.get_text(s,e,true);
204 Seed.check_syntax('var e = ' + str);
206 this.get('/RightEditor.view').el.modify_base(Gtk.StateType.NORMAL, new Gdk.Color({
207 red: 0xFFFF, green: 0xCCCC , blue : 0xCCCC
209 //print("SYNTAX ERROR IN EDITOR");
214 this.get('/RightEditor.view').el.modify_base(Gtk.StateType.NORMAL, new Gdk.Color({
215 red: 0xFFFF, green: 0xFFFF , blue : 0xFFFF
218 this.get('/LeftPanel.model').changed( str , false);
232 pack : "add_action_widget,1",
237 pack : "add_action_widget,0",
243 XObject.cache['/FixBug'] = FixBug;