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_diff_view diff_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.diff_view.el.get_buffer().set_text("diff goes here");
57 //console.log('show all');
58 this.el.set_modal(true);
59 this.el.set_relative_to(btn);
61 //this.el.set_position(Gtk.PositionType.RIGHT);
64 print("SHOWALL - POPIP\n");
66 this.el.set_size_request(800,500);
67 this.view.el.grab_focus();
72 public class Xcls_Box2 : Object
75 private Xcls_RooProjectSettings _this;
81 public Xcls_Box2(Xcls_RooProjectSettings _owner )
84 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
89 this.el.homogeneous = false;
90 this.el.border_width = 5;
91 var child_0 = new Xcls_Notebook3( _this );
93 this.el.pack_start ( child_0.el , true,true,0 );
94 var child_1 = new Xcls_Box12( _this );
96 this.el.pack_end ( child_1.el , false,false,0 );
99 // user defined functions
101 public class Xcls_Notebook3 : Object
103 public Gtk.Notebook el;
104 private Xcls_RooProjectSettings _this;
110 public Xcls_Notebook3(Xcls_RooProjectSettings _owner )
113 this.el = new Gtk.Notebook();
117 // set gobject values
118 var child_0 = new Xcls_label_status( _this );
120 var child_1 = new Xcls_label_diff( _this );
122 var child_2 = new Xcls_Box6( _this );
124 this.el.append_page ( child_2.el , _this.label_status.el );
125 var child_3 = new Xcls_Box9( _this );
127 this.el.append_page ( child_3.el , _this.label_diff.el );
130 // user defined functions
132 public class Xcls_label_status : Object
135 private Xcls_RooProjectSettings _this;
141 public Xcls_label_status(Xcls_RooProjectSettings _owner )
144 _this.label_status = this;
145 this.el = new Gtk.Label( "Status" );
149 // set gobject values
152 // user defined functions
155 public class Xcls_label_diff : Object
158 private Xcls_RooProjectSettings _this;
164 public Xcls_label_diff(Xcls_RooProjectSettings _owner )
167 _this.label_diff = this;
168 this.el = new Gtk.Label( "Diff" );
172 // set gobject values
175 // user defined functions
178 public class Xcls_Box6 : Object
181 private Xcls_RooProjectSettings _this;
187 public Xcls_Box6(Xcls_RooProjectSettings _owner )
190 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
194 // set gobject values
195 this.el.homogeneous = false;
196 var child_0 = new Xcls_ScrolledWindow7( _this );
198 this.el.pack_start ( child_0.el , true,true,0 );
201 // user defined functions
203 public class Xcls_ScrolledWindow7 : Object
205 public Gtk.ScrolledWindow el;
206 private Xcls_RooProjectSettings _this;
212 public Xcls_ScrolledWindow7(Xcls_RooProjectSettings _owner )
215 this.el = new Gtk.ScrolledWindow( null, null );
219 // set gobject values
220 var child_0 = new Xcls_diff_view( _this );
222 this.el.add ( child_0.el );
225 // user defined functions
227 public class Xcls_diff_view : Object
229 public Gtk.SourceView el;
230 private Xcls_RooProjectSettings _this;
236 public Xcls_diff_view(Xcls_RooProjectSettings _owner )
239 _this.diff_view = this;
240 this.el = new Gtk.SourceView();
246 var description = Pango.FontDescription.from_string("monospace");
247 description.set_size(9000);
248 this.el.override_font(description);
251 // user defined functions
256 public class Xcls_Box9 : Object
259 private Xcls_RooProjectSettings _this;
265 public Xcls_Box9(Xcls_RooProjectSettings _owner )
268 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
272 // set gobject values
273 this.el.homogeneous = false;
274 var child_0 = new Xcls_ScrolledWindow10( _this );
276 this.el.pack_start ( child_0.el , true,true,0 );
279 // user defined functions
281 public class Xcls_ScrolledWindow10 : Object
283 public Gtk.ScrolledWindow el;
284 private Xcls_RooProjectSettings _this;
290 public Xcls_ScrolledWindow10(Xcls_RooProjectSettings _owner )
293 this.el = new Gtk.ScrolledWindow( null, null );
297 // set gobject values
298 var child_0 = new Xcls_view( _this );
300 this.el.add ( child_0.el );
303 // user defined functions
305 public class Xcls_view : Object
307 public Gtk.SourceView el;
308 private Xcls_RooProjectSettings _this;
314 public Xcls_view(Xcls_RooProjectSettings _owner )
318 this.el = new Gtk.SourceView();
324 var description = Pango.FontDescription.from_string("monospace");
325 description.set_size(9000);
326 this.el.override_font(description);
329 this.el.key_release_event.connect( ( event) =>{
330 if (event.keyval != 115) {
334 if ( (event.state & Gdk.ModifierType.CONTROL_MASK ) < 1 ) {
337 var buf = this.el.get_buffer();
340 buf.get_start_iter(out s);
341 buf.get_end_iter(out e);
342 _this.project.runhtml = buf.get_text(s,e,true);
345 _this.buttonPressed("save");
352 // user defined functions
358 public class Xcls_Box12 : Object
361 private Xcls_RooProjectSettings _this;
367 public Xcls_Box12(Xcls_RooProjectSettings _owner )
370 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
374 // set gobject values
375 this.el.homogeneous = true;
376 this.el.expand = false;
377 this.el.vexpand = false;
378 var child_0 = new Xcls_Button13( _this );
380 this.el.add ( child_0.el );
381 var child_1 = new Xcls_Button14( _this );
383 this.el.add ( child_1.el );
384 var child_2 = new Xcls_Button15( _this );
386 this.el.add ( child_2.el );
389 // user defined functions
391 public class Xcls_Button13 : Object
393 public Gtk.Button el;
394 private Xcls_RooProjectSettings _this;
400 public Xcls_Button13(Xcls_RooProjectSettings _owner )
403 this.el = new Gtk.Button();
407 // set gobject values
408 this.el.label = "Stash Changes";
411 this.el.button_press_event.connect( () => {
417 // user defined functions
420 public class Xcls_Button14 : Object
422 public Gtk.Button el;
423 private Xcls_RooProjectSettings _this;
429 public Xcls_Button14(Xcls_RooProjectSettings _owner )
432 this.el = new Gtk.Button();
436 // set gobject values
437 this.el.label = "Commit Changes";
440 this.el.button_press_event.connect( () => {
446 // user defined functions
449 public class Xcls_Button15 : Object
451 public Gtk.Button el;
452 private Xcls_RooProjectSettings _this;
458 public Xcls_Button15(Xcls_RooProjectSettings _owner )
461 this.el = new Gtk.Button();
465 // set gobject values
466 this.el.label = "Ignore or now";
469 this.el.button_press_event.connect( () => {
475 // user defined functions