3 public class Clone : Object
8 public static Clone singleton()
23 this.el = new Gtk.Popover( null );
28 this.el.border_width = 0;
30 this.el.position = Gtk.PositionType.RIGHT;
31 var child_0 = new Xcls_Box2( _this );
33 this.el.add ( child_0.el );
36 // user defined functions
37 public void show (Gtk.Widget btn, Gdk.Rectangle rect, GitRepo repo) {
39 // get the active project.
40 var lm = Gtk.SourceLanguageManager.get_default();
42 // ((Gtk.SourceBuffer)(_this.view.el.get_buffer())) .set_language(
43 // lm.get_language("html")
47 //project.runhtml = project.runhtml || '';
48 _this.diff_view.el.get_buffer().set_text(repo.git_diff);
49 _this.status_view.el.get_buffer().set_text(repo.git_status);
51 //console.log('show all');
52 this.el.set_modal(true);
53 this.el.set_relative_to(btn);
54 this.el.set_pointing_to(rect);
56 //this.el.set_position(Gtk.PositionType.RIGHT);
59 GLib.debug("SHOWALL - POPIP\n");
61 //this.el.set_size_request(800,500);
62 // this.diff_view.el.grab_focus();
66 public class Xcls_Box2 : Object
75 public Xcls_Box2(Clone _owner )
78 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
83 this.el.homogeneous = false;
84 this.el.border_width = 5;
85 var child_0 = new Xcls_Box3( _this );
87 this.el.pack_end ( child_0.el , false,false,0 );
90 // user defined functions
92 public class Xcls_Box3 : Object
101 public Xcls_Box3(Clone _owner )
104 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
108 // set gobject values
109 this.el.homogeneous = true;
110 this.el.expand = false;
111 this.el.vexpand = false;
112 var child_0 = new Xcls_Button4( _this );
114 this.el.add ( child_0.el );
115 var child_1 = new Xcls_Button5( _this );
117 this.el.add ( child_1.el );
118 var child_2 = new Xcls_Button6( _this );
120 this.el.add ( child_2.el );
121 var child_3 = new Xcls_Button7( _this );
123 this.el.add ( child_3.el );
126 // user defined functions
128 public class Xcls_Button4 : Object
130 public Gtk.Button el;
137 public Xcls_Button4(Clone _owner )
140 this.el = new Gtk.Button();
144 // set gobject values
145 this.el.label = "Stash Changes";
148 this.el.button_press_event.connect( () => {
151 GitMonitor.gitmonitor.stop();
152 _this.repo.git({ "stash" , "--all" });
153 _this.repo.loadStatus();
154 GitMonitor.gitmonitor.start();
155 _this.diff_view.el.get_buffer().set_text(_this.repo.git_diff);
156 _this.status_view.el.get_buffer().set_text(_this.repo.git_status);
157 Clones.singleton().reposStore.load();
164 // user defined functions
167 public class Xcls_Button5 : Object
169 public Gtk.Button el;
176 public Xcls_Button5(Clone _owner )
179 this.el = new Gtk.Button();
183 // set gobject values
184 this.el.label = "Commit Changes";
187 this.el.button_press_event.connect( () => {
188 _this.repo.git({ "commit" , "-a" ,"-m", "Uncommited changes synced" });
190 _this.repo.loadStatus();
192 _this.diff_view.el.get_buffer().set_text(_this.repo.git_diff);
193 _this.status_view.el.get_buffer().set_text(_this.repo.git_status);
196 Clones.singleton().reposStore.load();
202 // user defined functions
205 public class Xcls_Button6 : Object
207 public Gtk.Button el;
214 public Xcls_Button6(Clone _owner )
217 this.el = new Gtk.Button();
221 // set gobject values
222 this.el.label = "Create Branch";
225 this.el.button_press_event.connect( () => {
226 var oldq = new Gee.ArrayList<GitMonitorQueue>();
228 NewBranch.singleton().show(_this.repo, oldq);
234 // user defined functions
237 public class Xcls_Button7 : Object
239 public Gtk.Button el;
246 public Xcls_Button7(Clone _owner )
249 this.el = new Gtk.Button();
253 // set gobject values
254 this.el.label = "Ignore for now";
257 this.el.button_press_event.connect( () => {
263 // user defined functions