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 console = imports.console;
11 XObject = imports.XObject.XObject;
12 EditProject=new XObject({
15 destroy_event : (self, event) => {
19 response : (self, id) => {
24 if (_this.xtype.getValue().length < 1) {
25 StandardErrorDialog.show("You have to set Project type");
28 if (_this.dir.el.get_filename().length < 1) {
29 StandardErrorDialog.show("You have to select a folder");
36 var fn = _this.dir.el.get_filename();
38 var project = Project.Project.factory(_this.xtype.getValue(), fn);
41 //var pr = imports.Builder.Provider.ProjectManager.ProjectManager.update(this.project);
43 this.success(project);
50 title : "Project Properties",
56 //[ 'xtype' ].forEach(function(k) {
57 // _this.get(k).setValue(typeof(c[k]) == 'undefined' ? '' : c[k]);
60 _this.model.loadData();
62 //this.success = c.success;
67 pack : get_content_area().add,
71 pack : "pack_start,false,true,3",
75 pack : "pack_start,false,true,3",
76 label : "Project type :"
81 pack : "pack_end,true,true,3",
82 init : this.el.add_attribute(cellrender , "markup", 1 );,
87 for (var i =0;i < this.data.length; i++ ) {
88 if (v == this.data.nth_datA(i)) {
94 'string:getValue' : () {
95 var ix = this.el.get_active();
109 xtype: Gtk.CellRendererText,
111 pack : "pack_start,true"
114 xtype: Gtk.ListStore,
115 columns : "typeof(string),typeof(string)",
119 'void:loadData' : ( ) {
126 el.set_value(iter, 0, "Roo");
127 el.set_value(iter, 1, "Roo Project");
130 el.set_value(iter, 0, "Gtk");
131 el.set_value(iter, 1, "Gtk Project");
142 xtype: Gtk.FileChooserWidget,
143 pack : "pack_end,true,true,5",
144 action : Gtk.FileChooserAction.SELECT_FOLDER,
146 select_multiple : false
152 pack : "add_action_widget,1",
157 pack : "add_action_widget,0",
163 XObject.cache['/EditProject'] = EditProject;