1 static Xcls_RooProjectSettings _RooProjectSettings;
3 public class Xcls_RooProjectSettings : Object
6 private Xcls_RooProjectSettings _this;
8 public static Xcls_RooProjectSettings singleton()
10 if (_RooProjectSettings == null) {
11 _RooProjectSettings= new Xcls_RooProjectSettings();
13 return _RooProjectSettings;
15 public Xcls_label_status label_status;
16 public Xcls_label_diff label_diff;
17 public Xcls_view view;
18 public Xcls_view view;
21 public signal void buttonPressed (string btn);
22 public Project.Project project;
25 public Xcls_RooProjectSettings()
28 this.el = new Gtk.Popover( null );
33 this.el.border_width = 0;
35 this.el.position = Gtk.PositionType.RIGHT;
36 var child_0 = new Xcls_Box2( _this );
38 this.el.add ( child_0.el );
41 // user defined functions
42 public void show (Gtk.Widget btn, Project.Project project) {
43 _this.project = project;
44 _this.path.el.label = project.firstPath();
45 // get the active project.
46 var lm = Gtk.SourceLanguageManager.get_default();
48 ((Gtk.SourceBuffer)(_this.view.el.get_buffer())) .set_language(
49 lm.get_language("html")
53 //project.runhtml = project.runhtml || '';
54 _this.view.el.get_buffer().set_text(project.runhtml);
58 _this.rootURL.el.set_text( _this.project.rootURL );
60 _this.html_gen_model.loadData(_this.project.html_gen);
62 _this.base_template_model.loadData();
64 var js = _this.project;
65 _this.database_DBTYPE.el.set_text( js.get_string_member("DBTYPE") );
66 _this.database_DBNAME.el.set_text( js.get_string_member("DBNAME") );
67 _this.database_DBUSERNAME.el.set_text( js.get_string_member("DBUSERNAME") );
68 _this.database_DBPASSWORD.el.set_text( js.get_string_member("DBPASSWORD") );
70 //console.log('show all');
71 this.el.set_modal(true);
72 this.el.set_relative_to(btn);
74 this.el.set_position(Gtk.PositionType.RIGHT);
77 print("SHOWALL - POPIP\n");
79 this.el.set_size_request(800,500);
80 this.view.el.grab_focus();
85 public class Xcls_Box2 : Object
88 private Xcls_RooProjectSettings _this;
94 public Xcls_Box2(Xcls_RooProjectSettings _owner )
97 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
101 // set gobject values
102 this.el.homogeneous = false;
103 this.el.border_width = 5;
104 var child_0 = new Xcls_Notebook3( _this );
106 this.el.pack_start ( child_0.el , true,true,0 );
107 var child_1 = new Xcls_Box12( _this );
109 this.el.pack_end ( child_1.el , false,false,0 );
112 // user defined functions
114 public class Xcls_Notebook3 : Object
116 public Gtk.Notebook el;
117 private Xcls_RooProjectSettings _this;
123 public Xcls_Notebook3(Xcls_RooProjectSettings _owner )
126 this.el = new Gtk.Notebook();
130 // set gobject values
131 var child_0 = new Xcls_label_status( _this );
133 var child_1 = new Xcls_label_diff( _this );
135 var child_2 = new Xcls_Box6( _this );
137 this.el.append_page ( child_2.el , _this.label_status.el );
138 var child_3 = new Xcls_Box9( _this );
140 this.el.append_page ( child_3.el , _this.label_diff.el );
143 // user defined functions
145 public class Xcls_label_status : Object
148 private Xcls_RooProjectSettings _this;
154 public Xcls_label_status(Xcls_RooProjectSettings _owner )
157 _this.label_status = this;
158 this.el = new Gtk.Label( "Status" );
162 // set gobject values
165 // user defined functions
168 public class Xcls_label_diff : Object
171 private Xcls_RooProjectSettings _this;
177 public Xcls_label_diff(Xcls_RooProjectSettings _owner )
180 _this.label_diff = this;
181 this.el = new Gtk.Label( "Diff" );
185 // set gobject values
188 // user defined functions
191 public class Xcls_Box6 : Object
194 private Xcls_RooProjectSettings _this;
200 public Xcls_Box6(Xcls_RooProjectSettings _owner )
203 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
207 // set gobject values
208 this.el.homogeneous = false;
209 var child_0 = new Xcls_ScrolledWindow7( _this );
211 this.el.pack_start ( child_0.el , true,true,0 );
214 // user defined functions
216 public class Xcls_ScrolledWindow7 : Object
218 public Gtk.ScrolledWindow el;
219 private Xcls_RooProjectSettings _this;
225 public Xcls_ScrolledWindow7(Xcls_RooProjectSettings _owner )
228 this.el = new Gtk.ScrolledWindow( null, null );
232 // set gobject values
233 var child_0 = new Xcls_view( _this );
235 this.el.add ( child_0.el );
238 // user defined functions
240 public class Xcls_view : Object
242 public Gtk.SourceView el;
243 private Xcls_RooProjectSettings _this;
249 public Xcls_view(Xcls_RooProjectSettings _owner )
253 this.el = new Gtk.SourceView();
259 var description = Pango.FontDescription.from_string("monospace");
260 description.set_size(9000);
261 this.el.override_font(description);
264 this.el.key_release_event.connect( ( event) =>{
265 if (event.keyval != 115) {
269 if ( (event.state & Gdk.ModifierType.CONTROL_MASK ) < 1 ) {
272 var buf = this.el.get_buffer();
275 buf.get_start_iter(out s);
276 buf.get_end_iter(out e);
277 _this.project.runhtml = buf.get_text(s,e,true);
280 _this.buttonPressed("save");
287 // user defined functions
292 public class Xcls_Box9 : Object
295 private Xcls_RooProjectSettings _this;
301 public Xcls_Box9(Xcls_RooProjectSettings _owner )
304 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
308 // set gobject values
309 this.el.homogeneous = false;
310 var child_0 = new Xcls_ScrolledWindow10( _this );
312 this.el.pack_start ( child_0.el , true,true,0 );
315 // user defined functions
317 public class Xcls_ScrolledWindow10 : Object
319 public Gtk.ScrolledWindow el;
320 private Xcls_RooProjectSettings _this;
326 public Xcls_ScrolledWindow10(Xcls_RooProjectSettings _owner )
329 this.el = new Gtk.ScrolledWindow( null, null );
333 // set gobject values
334 var child_0 = new Xcls_view( _this );
336 this.el.add ( child_0.el );
339 // user defined functions
341 public class Xcls_view : Object
343 public Gtk.SourceView el;
344 private Xcls_RooProjectSettings _this;
350 public Xcls_view(Xcls_RooProjectSettings _owner )
354 this.el = new Gtk.SourceView();
360 var description = Pango.FontDescription.from_string("monospace");
361 description.set_size(9000);
362 this.el.override_font(description);
365 this.el.key_release_event.connect( ( event) =>{
366 if (event.keyval != 115) {
370 if ( (event.state & Gdk.ModifierType.CONTROL_MASK ) < 1 ) {
373 var buf = this.el.get_buffer();
376 buf.get_start_iter(out s);
377 buf.get_end_iter(out e);
378 _this.project.runhtml = buf.get_text(s,e,true);
381 _this.buttonPressed("save");
388 // user defined functions
394 public class Xcls_Box12 : Object
397 private Xcls_RooProjectSettings _this;
403 public Xcls_Box12(Xcls_RooProjectSettings _owner )
406 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
410 // set gobject values
411 this.el.homogeneous = true;
412 this.el.expand = false;
413 this.el.vexpand = false;
414 var child_0 = new Xcls_Button13( _this );
416 this.el.add ( child_0.el );
417 var child_1 = new Xcls_Button14( _this );
419 this.el.add ( child_1.el );
420 var child_2 = new Xcls_Button15( _this );
422 this.el.add ( child_2.el );
425 // user defined functions
427 public class Xcls_Button13 : Object
429 public Gtk.Button el;
430 private Xcls_RooProjectSettings _this;
436 public Xcls_Button13(Xcls_RooProjectSettings _owner )
439 this.el = new Gtk.Button();
443 // set gobject values
444 this.el.label = "Stash Changes";
447 this.el.button_press_event.connect( () => {
453 // user defined functions
456 public class Xcls_Button14 : Object
458 public Gtk.Button el;
459 private Xcls_RooProjectSettings _this;
465 public Xcls_Button14(Xcls_RooProjectSettings _owner )
468 this.el = new Gtk.Button();
472 // set gobject values
473 this.el.label = "Commit Changes";
476 this.el.button_press_event.connect( () => {
482 // user defined functions
485 public class Xcls_Button15 : Object
487 public Gtk.Button el;
488 private Xcls_RooProjectSettings _this;
494 public Xcls_Button15(Xcls_RooProjectSettings _owner )
497 this.el = new Gtk.Button();
501 // set gobject values
502 this.el.label = "Ignore or now";
505 this.el.button_press_event.connect( () => {
511 // user defined functions