1 static Xcls_RepoStatusPopover _RepoStatusPopover;
3 public class Xcls_RepoStatusPopover : Object
6 private Xcls_RepoStatusPopover _this;
8 public static Xcls_RepoStatusPopover singleton()
10 if (_RepoStatusPopover == null) {
11 _RepoStatusPopover= new Xcls_RepoStatusPopover();
13 return _RepoStatusPopover;
15 public Xcls_label_status label_status;
16 public Xcls_label_diff label_diff;
17 public Xcls_status_view status_view;
18 public Xcls_diff_view diff_view;
24 public Xcls_RepoStatusPopover()
27 this.el = new Gtk.Popover( null );
32 this.el.border_width = 0;
34 this.el.position = Gtk.PositionType.RIGHT;
35 var child_0 = new Xcls_Box2( _this );
37 this.el.add ( child_0.el );
40 // user defined functions
41 public void show (Gtk.Widget btn, GitRepo repo) {
43 // get the active project.
44 var lm = Gtk.SourceLanguageManager.get_default();
46 // ((Gtk.SourceBuffer)(_this.view.el.get_buffer())) .set_language(
47 // lm.get_language("html")
51 //project.runhtml = project.runhtml || '';
52 _this.diff_view.el.get_buffer().set_text("diff goes here");
55 //console.log('show all');
56 this.el.set_modal(true);
57 this.el.set_relative_to(btn);
59 //this.el.set_position(Gtk.PositionType.RIGHT);
62 print("SHOWALL - POPIP\n");
64 this.el.set_size_request(800,500);
65 this.view.el.grab_focus();
69 public class Xcls_Box2 : Object
72 private Xcls_RepoStatusPopover _this;
78 public Xcls_Box2(Xcls_RepoStatusPopover _owner )
81 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
86 this.el.homogeneous = false;
87 this.el.border_width = 5;
88 var child_0 = new Xcls_Notebook3( _this );
90 this.el.pack_start ( child_0.el , true,true,0 );
91 var child_1 = new Xcls_Box12( _this );
93 this.el.pack_end ( child_1.el , false,false,0 );
96 // user defined functions
98 public class Xcls_Notebook3 : Object
100 public Gtk.Notebook el;
101 private Xcls_RepoStatusPopover _this;
107 public Xcls_Notebook3(Xcls_RepoStatusPopover _owner )
110 this.el = new Gtk.Notebook();
114 // set gobject values
115 var child_0 = new Xcls_label_status( _this );
117 var child_1 = new Xcls_label_diff( _this );
119 var child_2 = new Xcls_Box6( _this );
121 this.el.append_page ( child_2.el , _this.label_status.el );
122 var child_3 = new Xcls_Box9( _this );
124 this.el.append_page ( child_3.el , _this.label_diff.el );
127 // user defined functions
129 public class Xcls_label_status : Object
132 private Xcls_RepoStatusPopover _this;
138 public Xcls_label_status(Xcls_RepoStatusPopover _owner )
141 _this.label_status = this;
142 this.el = new Gtk.Label( "Status" );
146 // set gobject values
149 // user defined functions
152 public class Xcls_label_diff : Object
155 private Xcls_RepoStatusPopover _this;
161 public Xcls_label_diff(Xcls_RepoStatusPopover _owner )
164 _this.label_diff = this;
165 this.el = new Gtk.Label( "Diff" );
169 // set gobject values
172 // user defined functions
175 public class Xcls_Box6 : Object
178 private Xcls_RepoStatusPopover _this;
184 public Xcls_Box6(Xcls_RepoStatusPopover _owner )
187 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
191 // set gobject values
192 this.el.homogeneous = false;
193 var child_0 = new Xcls_ScrolledWindow7( _this );
195 this.el.pack_start ( child_0.el , true,true,0 );
198 // user defined functions
200 public class Xcls_ScrolledWindow7 : Object
202 public Gtk.ScrolledWindow el;
203 private Xcls_RepoStatusPopover _this;
209 public Xcls_ScrolledWindow7(Xcls_RepoStatusPopover _owner )
212 this.el = new Gtk.ScrolledWindow( null, null );
216 // set gobject values
217 var child_0 = new Xcls_status_view( _this );
219 this.el.add ( child_0.el );
222 // user defined functions
224 public class Xcls_status_view : Object
226 public Gtk.SourceView el;
227 private Xcls_RepoStatusPopover _this;
233 public Xcls_status_view(Xcls_RepoStatusPopover _owner )
236 _this.status_view = this;
237 this.el = new Gtk.SourceView();
243 var description = Pango.FontDescription.from_string("monospace");
244 description.set_size(9000);
245 this.el.override_font(description);
248 // user defined functions
253 public class Xcls_Box9 : Object
256 private Xcls_RepoStatusPopover _this;
262 public Xcls_Box9(Xcls_RepoStatusPopover _owner )
265 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
269 // set gobject values
270 this.el.homogeneous = false;
271 var child_0 = new Xcls_ScrolledWindow10( _this );
273 this.el.pack_start ( child_0.el , true,true,0 );
276 // user defined functions
278 public class Xcls_ScrolledWindow10 : Object
280 public Gtk.ScrolledWindow el;
281 private Xcls_RepoStatusPopover _this;
287 public Xcls_ScrolledWindow10(Xcls_RepoStatusPopover _owner )
290 this.el = new Gtk.ScrolledWindow( null, null );
294 // set gobject values
295 var child_0 = new Xcls_diff_view( _this );
297 this.el.add ( child_0.el );
300 // user defined functions
302 public class Xcls_diff_view : Object
304 public Gtk.SourceView el;
305 private Xcls_RepoStatusPopover _this;
311 public Xcls_diff_view(Xcls_RepoStatusPopover _owner )
314 _this.diff_view = this;
315 this.el = new Gtk.SourceView();
321 var description = Pango.FontDescription.from_string("monospace");
322 description.set_size(9000);
323 this.el.override_font(description);
326 // user defined functions
332 public class Xcls_Box12 : Object
335 private Xcls_RepoStatusPopover _this;
341 public Xcls_Box12(Xcls_RepoStatusPopover _owner )
344 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
348 // set gobject values
349 this.el.homogeneous = true;
350 this.el.expand = false;
351 this.el.vexpand = false;
352 var child_0 = new Xcls_Button13( _this );
354 this.el.add ( child_0.el );
355 var child_1 = new Xcls_Button14( _this );
357 this.el.add ( child_1.el );
358 var child_2 = new Xcls_Button15( _this );
360 this.el.add ( child_2.el );
363 // user defined functions
365 public class Xcls_Button13 : Object
367 public Gtk.Button el;
368 private Xcls_RepoStatusPopover _this;
374 public Xcls_Button13(Xcls_RepoStatusPopover _owner )
377 this.el = new Gtk.Button();
381 // set gobject values
382 this.el.label = "Stash Changes";
385 this.el.button_press_event.connect( () => {
391 // user defined functions
394 public class Xcls_Button14 : Object
396 public Gtk.Button el;
397 private Xcls_RepoStatusPopover _this;
403 public Xcls_Button14(Xcls_RepoStatusPopover _owner )
406 this.el = new Gtk.Button();
410 // set gobject values
411 this.el.label = "Commit Changes";
414 this.el.button_press_event.connect( () => {
420 // user defined functions
423 public class Xcls_Button15 : Object
425 public Gtk.Button el;
426 private Xcls_RepoStatusPopover _this;
432 public Xcls_Button15(Xcls_RepoStatusPopover _owner )
435 this.el = new Gtk.Button();
439 // set gobject values
440 this.el.label = "Ignore or now";
443 this.el.button_press_event.connect( () => {
449 // user defined functions