1 static RepoStatusPopover _RepoStatusPopover;
3 public class RepoStatusPopover : Object
6 private RepoStatusPopover _this;
8 public static RepoStatusPopover singleton()
10 if (_RepoStatusPopover == null) {
11 _RepoStatusPopover= new 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 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, Gdk.Rectangle rect, 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");
53 _this.status_view.el.get_buffer().set_text("status goes here");
55 //console.log('show all');
56 this.el.set_modal(true);
57 this.el.set_pointing_to(rect);
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.diff_view.el.grab_focus();
71 public class Xcls_Box2 : Object
74 private RepoStatusPopover _this;
80 public Xcls_Box2(RepoStatusPopover _owner )
83 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
88 this.el.homogeneous = false;
89 this.el.border_width = 5;
90 var child_0 = new Xcls_Notebook3( _this );
92 this.el.pack_start ( child_0.el , true,true,0 );
93 var child_1 = new Xcls_Box12( _this );
95 this.el.pack_end ( child_1.el , false,false,0 );
98 // user defined functions
100 public class Xcls_Notebook3 : Object
102 public Gtk.Notebook el;
103 private RepoStatusPopover _this;
109 public Xcls_Notebook3(RepoStatusPopover _owner )
112 this.el = new Gtk.Notebook();
116 // set gobject values
117 var child_0 = new Xcls_label_status( _this );
119 var child_1 = new Xcls_label_diff( _this );
121 var child_2 = new Xcls_Box6( _this );
123 this.el.append_page ( child_2.el , _this.label_status.el );
124 var child_3 = new Xcls_Box9( _this );
126 this.el.append_page ( child_3.el , _this.label_diff.el );
129 // user defined functions
131 public class Xcls_label_status : Object
134 private RepoStatusPopover _this;
140 public Xcls_label_status(RepoStatusPopover _owner )
143 _this.label_status = this;
144 this.el = new Gtk.Label( "Status" );
148 // set gobject values
151 // user defined functions
154 public class Xcls_label_diff : Object
157 private RepoStatusPopover _this;
163 public Xcls_label_diff(RepoStatusPopover _owner )
166 _this.label_diff = this;
167 this.el = new Gtk.Label( "Diff" );
171 // set gobject values
174 // user defined functions
177 public class Xcls_Box6 : Object
180 private RepoStatusPopover _this;
186 public Xcls_Box6(RepoStatusPopover _owner )
189 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
193 // set gobject values
194 this.el.homogeneous = false;
195 var child_0 = new Xcls_ScrolledWindow7( _this );
197 this.el.pack_start ( child_0.el , true,true,0 );
200 // user defined functions
202 public class Xcls_ScrolledWindow7 : Object
204 public Gtk.ScrolledWindow el;
205 private RepoStatusPopover _this;
211 public Xcls_ScrolledWindow7(RepoStatusPopover _owner )
214 this.el = new Gtk.ScrolledWindow( null, null );
218 // set gobject values
219 var child_0 = new Xcls_status_view( _this );
221 this.el.add ( child_0.el );
224 // user defined functions
226 public class Xcls_status_view : Object
228 public Gtk.SourceView el;
229 private RepoStatusPopover _this;
235 public Xcls_status_view(RepoStatusPopover _owner )
238 _this.status_view = this;
239 this.el = new Gtk.SourceView();
245 var description = Pango.FontDescription.from_string("monospace");
246 description.set_size(9000);
247 this.el.override_font(description);
250 // user defined functions
255 public class Xcls_Box9 : Object
258 private RepoStatusPopover _this;
264 public Xcls_Box9(RepoStatusPopover _owner )
267 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
271 // set gobject values
272 this.el.homogeneous = false;
273 var child_0 = new Xcls_ScrolledWindow10( _this );
275 this.el.pack_start ( child_0.el , true,true,0 );
278 // user defined functions
280 public class Xcls_ScrolledWindow10 : Object
282 public Gtk.ScrolledWindow el;
283 private RepoStatusPopover _this;
289 public Xcls_ScrolledWindow10(RepoStatusPopover _owner )
292 this.el = new Gtk.ScrolledWindow( null, null );
296 // set gobject values
297 var child_0 = new Xcls_diff_view( _this );
299 this.el.add ( child_0.el );
302 // user defined functions
304 public class Xcls_diff_view : Object
306 public Gtk.SourceView el;
307 private RepoStatusPopover _this;
313 public Xcls_diff_view(RepoStatusPopover _owner )
316 _this.diff_view = this;
317 this.el = new Gtk.SourceView();
323 var description = Pango.FontDescription.from_string("monospace");
324 description.set_size(9000);
325 this.el.override_font(description);
328 // user defined functions
334 public class Xcls_Box12 : Object
337 private RepoStatusPopover _this;
343 public Xcls_Box12(RepoStatusPopover _owner )
346 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
350 // set gobject values
351 this.el.homogeneous = true;
352 this.el.expand = false;
353 this.el.vexpand = false;
354 var child_0 = new Xcls_Button13( _this );
356 this.el.add ( child_0.el );
357 var child_1 = new Xcls_Button14( _this );
359 this.el.add ( child_1.el );
360 var child_2 = new Xcls_Button15( _this );
362 this.el.add ( child_2.el );
365 // user defined functions
367 public class Xcls_Button13 : Object
369 public Gtk.Button el;
370 private RepoStatusPopover _this;
376 public Xcls_Button13(RepoStatusPopover _owner )
379 this.el = new Gtk.Button();
383 // set gobject values
384 this.el.label = "Stash Changes";
387 this.el.button_press_event.connect( () => {
393 // user defined functions
396 public class Xcls_Button14 : Object
398 public Gtk.Button el;
399 private RepoStatusPopover _this;
405 public Xcls_Button14(RepoStatusPopover _owner )
408 this.el = new Gtk.Button();
412 // set gobject values
413 this.el.label = "Commit Changes";
416 this.el.button_press_event.connect( () => {
422 // user defined functions
425 public class Xcls_Button15 : Object
427 public Gtk.Button el;
428 private RepoStatusPopover _this;
434 public Xcls_Button15(RepoStatusPopover _owner )
437 this.el = new Gtk.Button();
441 // set gobject values
442 this.el.label = "Ignore or now";
445 this.el.button_press_event.connect( () => {
451 // user defined functions