2 valac --pkg gio-2.0 --pkg posix --pkg gtk+-3.0 --pkg libnotify --pkg gtksourceview-3.0 --pkg libwnck-3.0 \
3 /tmp/EditProject.vala -o /tmp/EditProject
8 static int main (string[] args) {
10 new Xcls_EditProject();
11 EditProject.show_all();
18 public static Xcls_EditProject EditProject;
20 public class Xcls_EditProject
23 private static Xcls_EditProject _this;
25 public Xcls_xtype xtype;
26 public Xcls_cellrender cellrender;
27 public Xcls_model model;
31 public signal void success(Project.Project project);
34 public Xcls_EditProject()
36 this.el = new Gtk.Dialog();
43 this.el.border_width = 3;
44 this.el.default_height = 500;
45 this.el.default_width = 600;
46 this.el.deletable = true;
48 this.el.title = "Project Properties";
49 var child_0 = new Xcls_VBox2();
50 this.el. get_content_area().add
53 var child_1 = new Xcls_Button9();
54 this.el.add_action_widget ( child_1.el , 1 );
55 var child_2 = new Xcls_Button10();
56 this.el.add_action_widget ( child_2.el , 0 );
59 this.el.destroy_event.connect( (self, event) => {
63 this.el.response.connect( (self, id) => {
68 if (_this.xtype.getValue().length < 1) {
69 StandardErrorDialog.show("You have to set Project type");
72 if (_this.dir.el.get_filename().length < 1) {
73 StandardErrorDialog.show("You have to select a folder");
80 var fn = _this.dir.el.get_filename();
82 var project = Project.Project.factory(_this.xtype.getValue(), fn);
85 //var pr = imports.Builder.Provider.ProjectManager.ProjectManager.update(this.project);
87 this.success(project);
92 // userdefined functions
94 // skip listeners - not pipe
96 // skip .signal:void:success(Project.Project project) - already used
98 // skip border_width - already used
100 // skip default_height - already used
102 // skip default_width - already used
104 // skip title - already used
106 // skip xtype - not pipe
108 // skip |deletable - already used
110 // skip |modal - already used
114 //[ 'xtype' ].forEach(function(k) {
115 // _this.get(k).setValue(typeof(c[k]) == 'undefined' ? '' : c[k]);
117 // shouild set path..
118 _this.model.loadData();
120 //this.success = c.success;
123 // skip |xns - no return type
125 // skip items - not pipe
127 // skip id - not pipe
129 // skip xvala_cls - not pipe
131 // skip xvala_xcls - not pipe
133 // skip xvala_id - not pipe
134 public class Xcls_VBox2
143 this.el = new Gtk.VBox( true, 0 );
147 // set gobject values
148 var child_0 = new Xcls_HBox3();
149 this.el.pack_start ( child_0.el , false,true,3 );
150 var child_1 = new Xcls_dir();
151 this.el.pack_end ( child_1.el , true,true,5 );
154 // userdefined functions
156 // skip xtype - not pipe
158 // skip |pack - already used
160 // skip |xns - no return type
162 // skip items - not pipe
164 // skip xvala_cls - not pipe
166 // skip xvala_xcls - not pipe
168 // skip xvala_id - not pipe
170 public class Xcls_HBox3
179 this.el = new Gtk.HBox( true, 0 );
183 // set gobject values
184 var child_0 = new Xcls_Label4();
185 this.el.pack_start ( child_0.el , false,true,3 );
186 var child_1 = new Xcls_xtype();
187 this.el.pack_end ( child_1.el , true,true,3 );
190 // userdefined functions
192 // skip |xns - no return type
194 // skip xtype - not pipe
196 // skip pack - not pipe
198 // skip items - not pipe
200 // skip xvala_cls - not pipe
202 // skip xvala_xcls - not pipe
204 // skip xvala_id - not pipe
206 public class Xcls_Label4
215 this.el = new Gtk.Label( "Project type :" );
219 // set gobject values
222 // userdefined functions
224 // skip |xns - no return type
226 // skip xtype - not pipe
228 // skip pack - not pipe
230 // skip label - already used
232 // skip xvala_cls - not pipe
234 // skip xvala_xcls - not pipe
236 // skip xvala_id - not pipe
238 public class Xcls_xtype
240 public Gtk.ComboBox el;
247 this.el = new Gtk.ComboBox();
252 // set gobject values
253 var child_0 = new Xcls_cellrender();
254 this.el.pack_start ( child_0.el , true );
255 var child_1 = new Xcls_model();
256 this.el.set_model ( child_1.el );
259 // userdefined functions
261 // skip id - not pipe
263 // skip pack - not pipe
265 // skip xtype - not pipe
267 // skip |init - already used
269 // skip |setValue - no return type
270 public string getValue () {
271 var ix = this.el.get_active();
284 // skip |xns - no return type
286 // skip items - not pipe
288 // skip xvala_cls - not pipe
290 // skip xvala_xcls - not pipe
292 // skip xvala_id - not pipe
294 public class Xcls_cellrender
296 public Gtk.CellRendererText el;
301 public Xcls_cellrender()
303 this.el = new Gtk.CellRendererText();
304 _this.cellrender = this;
308 // set gobject values
311 // userdefined functions
313 // skip id - not pipe
315 // skip pack - not pipe
317 // skip xtype - not pipe
319 // skip |xns - no return type
321 // skip xvala_cls - not pipe
323 // skip xvala_xcls - not pipe
325 // skip xvala_id - not pipe
327 public class Xcls_model
329 public Gtk.ListStore el;
336 this.el = new Gtk.ListStore( 3, "typeof(string),typeof(string)" );
341 // set gobject values
344 // userdefined functions
346 // skip columns - already used
348 // skip id - not pipe
350 // skip n_columns - already used
352 // skip pack - not pipe
354 // skip xtype - not pipe
355 public void loadData ( ) {
362 el.set_value(iter, 0, "Roo");
363 el.set_value(iter, 1, "Roo Project");
366 el.set_value(iter, 0, "Gtk");
367 el.set_value(iter, 1, "Gtk Project");
373 // skip |xns - no return type
375 // skip xvala_cls - not pipe
377 // skip xvala_xcls - not pipe
379 // skip xvala_id - not pipe
381 public class Xcls_dir
383 public Gtk.FileChooserWidget el;
390 this.el = new Gtk.FileChooserWidget( Gtk.FileChooserAction.SELECT_FOLDER );
395 // set gobject values
396 this.el.select_multiple = false;
399 // userdefined functions
401 // skip |xns - no return type
403 // skip xtype - not pipe
405 // skip pack - not pipe
407 // skip |action - already used
409 // skip id - not pipe
411 // skip |select_multiple - already used
413 // skip xvala_cls - not pipe
415 // skip xvala_xcls - not pipe
417 // skip xvala_id - not pipe
419 public class Xcls_Button9
421 public Gtk.Button el;
426 public Xcls_Button9()
428 this.el = new Gtk.Button();
432 // set gobject values
433 this.el.label = "OK";
436 // userdefined functions
438 // skip |xns - no return type
440 // skip xtype - not pipe
442 // skip pack - not pipe
444 // skip label - already used
446 // skip xvala_cls - not pipe
448 // skip xvala_xcls - not pipe
450 // skip xvala_id - not pipe
452 public class Xcls_Button10
454 public Gtk.Button el;
459 public Xcls_Button10()
461 this.el = new Gtk.Button();
465 // set gobject values
466 this.el.label = "Cancel";
469 // userdefined functions
471 // skip |xns - no return type
473 // skip xtype - not pipe
475 // skip pack - not pipe
477 // skip label - already used
479 // skip xvala_cls - not pipe
481 // skip xvala_xcls - not pipe
483 // skip xvala_id - not pipe