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, GitRepo repo) {
44 // get the active project.
45 var lm = Gtk.SourceLanguageManager.get_default();
47 // ((Gtk.SourceBuffer)(_this.view.el.get_buffer())) .set_language(
48 // lm.get_language("html")
52 //project.runhtml = project.runhtml || '';
53 _this.view.el.get_buffer().set_text("diff goes here");
57 _this.rootURL.el.set_text( _this.project.rootURL );
59 _this.html_gen_model.loadData(_this.project.html_gen);
61 _this.base_template_model.loadData();
63 var js = _this.project;
64 _this.database_DBTYPE.el.set_text( js.get_string_member("DBTYPE") );
65 _this.database_DBNAME.el.set_text( js.get_string_member("DBNAME") );
66 _this.database_DBUSERNAME.el.set_text( js.get_string_member("DBUSERNAME") );
67 _this.database_DBPASSWORD.el.set_text( js.get_string_member("DBPASSWORD") );
69 //console.log('show all');
70 this.el.set_modal(true);
71 this.el.set_relative_to(btn);
73 this.el.set_position(Gtk.PositionType.RIGHT);
76 print("SHOWALL - POPIP\n");
78 this.el.set_size_request(800,500);
79 this.view.el.grab_focus();
84 public class Xcls_Box2 : Object
87 private Xcls_RooProjectSettings _this;
93 public Xcls_Box2(Xcls_RooProjectSettings _owner )
96 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
100 // set gobject values
101 this.el.homogeneous = false;
102 this.el.border_width = 5;
103 var child_0 = new Xcls_Notebook3( _this );
105 this.el.pack_start ( child_0.el , true,true,0 );
106 var child_1 = new Xcls_Box12( _this );
108 this.el.pack_end ( child_1.el , false,false,0 );
111 // user defined functions
113 public class Xcls_Notebook3 : Object
115 public Gtk.Notebook el;
116 private Xcls_RooProjectSettings _this;
122 public Xcls_Notebook3(Xcls_RooProjectSettings _owner )
125 this.el = new Gtk.Notebook();
129 // set gobject values
130 var child_0 = new Xcls_label_status( _this );
132 var child_1 = new Xcls_label_diff( _this );
134 var child_2 = new Xcls_Box6( _this );
136 this.el.append_page ( child_2.el , _this.label_status.el );
137 var child_3 = new Xcls_Box9( _this );
139 this.el.append_page ( child_3.el , _this.label_diff.el );
142 // user defined functions
144 public class Xcls_label_status : Object
147 private Xcls_RooProjectSettings _this;
153 public Xcls_label_status(Xcls_RooProjectSettings _owner )
156 _this.label_status = this;
157 this.el = new Gtk.Label( "Status" );
161 // set gobject values
164 // user defined functions
167 public class Xcls_label_diff : Object
170 private Xcls_RooProjectSettings _this;
176 public Xcls_label_diff(Xcls_RooProjectSettings _owner )
179 _this.label_diff = this;
180 this.el = new Gtk.Label( "Diff" );
184 // set gobject values
187 // user defined functions
190 public class Xcls_Box6 : Object
193 private Xcls_RooProjectSettings _this;
199 public Xcls_Box6(Xcls_RooProjectSettings _owner )
202 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
206 // set gobject values
207 this.el.homogeneous = false;
208 var child_0 = new Xcls_ScrolledWindow7( _this );
210 this.el.pack_start ( child_0.el , true,true,0 );
213 // user defined functions
215 public class Xcls_ScrolledWindow7 : Object
217 public Gtk.ScrolledWindow el;
218 private Xcls_RooProjectSettings _this;
224 public Xcls_ScrolledWindow7(Xcls_RooProjectSettings _owner )
227 this.el = new Gtk.ScrolledWindow( null, null );
231 // set gobject values
232 var child_0 = new Xcls_view( _this );
234 this.el.add ( child_0.el );
237 // user defined functions
239 public class Xcls_view : Object
241 public Gtk.SourceView el;
242 private Xcls_RooProjectSettings _this;
248 public Xcls_view(Xcls_RooProjectSettings _owner )
252 this.el = new Gtk.SourceView();
258 var description = Pango.FontDescription.from_string("monospace");
259 description.set_size(9000);
260 this.el.override_font(description);
263 this.el.key_release_event.connect( ( event) =>{
264 if (event.keyval != 115) {
268 if ( (event.state & Gdk.ModifierType.CONTROL_MASK ) < 1 ) {
271 var buf = this.el.get_buffer();
274 buf.get_start_iter(out s);
275 buf.get_end_iter(out e);
276 _this.project.runhtml = buf.get_text(s,e,true);
279 _this.buttonPressed("save");
286 // user defined functions
291 public class Xcls_Box9 : Object
294 private Xcls_RooProjectSettings _this;
300 public Xcls_Box9(Xcls_RooProjectSettings _owner )
303 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
307 // set gobject values
308 this.el.homogeneous = false;
309 var child_0 = new Xcls_ScrolledWindow10( _this );
311 this.el.pack_start ( child_0.el , true,true,0 );
314 // user defined functions
316 public class Xcls_ScrolledWindow10 : Object
318 public Gtk.ScrolledWindow el;
319 private Xcls_RooProjectSettings _this;
325 public Xcls_ScrolledWindow10(Xcls_RooProjectSettings _owner )
328 this.el = new Gtk.ScrolledWindow( null, null );
332 // set gobject values
333 var child_0 = new Xcls_view( _this );
335 this.el.add ( child_0.el );
338 // user defined functions
340 public class Xcls_view : Object
342 public Gtk.SourceView el;
343 private Xcls_RooProjectSettings _this;
349 public Xcls_view(Xcls_RooProjectSettings _owner )
353 this.el = new Gtk.SourceView();
359 var description = Pango.FontDescription.from_string("monospace");
360 description.set_size(9000);
361 this.el.override_font(description);
364 this.el.key_release_event.connect( ( event) =>{
365 if (event.keyval != 115) {
369 if ( (event.state & Gdk.ModifierType.CONTROL_MASK ) < 1 ) {
372 var buf = this.el.get_buffer();
375 buf.get_start_iter(out s);
376 buf.get_end_iter(out e);
377 _this.project.runhtml = buf.get_text(s,e,true);
380 _this.buttonPressed("save");
387 // user defined functions
393 public class Xcls_Box12 : Object
396 private Xcls_RooProjectSettings _this;
402 public Xcls_Box12(Xcls_RooProjectSettings _owner )
405 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
409 // set gobject values
410 this.el.homogeneous = true;
411 this.el.expand = false;
412 this.el.vexpand = false;
413 var child_0 = new Xcls_Button13( _this );
415 this.el.add ( child_0.el );
416 var child_1 = new Xcls_Button14( _this );
418 this.el.add ( child_1.el );
419 var child_2 = new Xcls_Button15( _this );
421 this.el.add ( child_2.el );
424 // user defined functions
426 public class Xcls_Button13 : Object
428 public Gtk.Button el;
429 private Xcls_RooProjectSettings _this;
435 public Xcls_Button13(Xcls_RooProjectSettings _owner )
438 this.el = new Gtk.Button();
442 // set gobject values
443 this.el.label = "Stash Changes";
446 this.el.button_press_event.connect( () => {
452 // user defined functions
455 public class Xcls_Button14 : Object
457 public Gtk.Button el;
458 private Xcls_RooProjectSettings _this;
464 public Xcls_Button14(Xcls_RooProjectSettings _owner )
467 this.el = new Gtk.Button();
471 // set gobject values
472 this.el.label = "Commit Changes";
475 this.el.button_press_event.connect( () => {
481 // user defined functions
484 public class Xcls_Button15 : Object
486 public Gtk.Button el;
487 private Xcls_RooProjectSettings _this;
493 public Xcls_Button15(Xcls_RooProjectSettings _owner )
496 this.el = new Gtk.Button();
500 // set gobject values
501 this.el.label = "Ignore or now";
504 this.el.button_press_event.connect( () => {
510 // user defined functions