}
return _Clones;
}
+ public Xcls_spinner spinner;
+ public Xcls_toolbar toolbar;
+ public Xcls_scrolled scrolled;
public Xcls_reposView reposView;
public Xcls_reposStore reposStore;
public Xcls_tv_autocommit tv_autocommit;
}
// user defined functions
- public void show () {
-
- GLib.debug("show clones?");
- this.el.set_deletable(true);
+ public void loadAndShow () {
+ this.el.set_deletable(true);
this.el.set_gravity(Gdk.Gravity.NORTH);
- this.el.move((Gdk.Screen.width() / 2 ) -400 ,0);
-
+ this.el.move((Gdk.Screen.width() / 2 ) - (int.min(1280,Gdk.Screen.width()) / 2) ,0);
+ this.el.set_keep_above(true);
this.el.set_default_size(
- int.min(1024,Gdk.Screen.width()),
- int.max(500,Gdk.Screen.height() - 300)
+ int.min(1280,Gdk.Screen.width()),
+ int.max(500,Gdk.Screen.height() - 200)
);
+ this.el.show_all();
+
+ this.toolbar.el.hide();
+ this.scrolled.el.hide();
+ this.spinner.el.show();
+ this.spinner.el.start();
+
+ GitRepo.updateAllAsync("show_clones");
+
+
+
+
+ }
+ public void show () {
+ this.el.set_deletable(true);
+ this.el.set_gravity(Gdk.Gravity.NORTH);
+ this.el.move((Gdk.Screen.width() / 2 ) - (int.max(1280,Gdk.Screen.width()) / 2) ,0);
+ this.el.set_keep_above(true);
+ this.el.set_default_size(
+ int.max(1280,Gdk.Screen.width()),
+ int.max(500,Gdk.Screen.height() - 100)
+ );
this.el.show_all();
- _this.reposStore.load();
- this.el.set_keep_above(true);
- GLib.debug("show clones = run?");
+ this.spinner.el.stop();
+ this.spinner.el.hide();
+ this.toolbar.el.show();
+ this.scrolled.el.show();
+
+
+
+
+ this.reposStore.load();
+
+ GLib.debug("show clones = run?");
this.el.run();
// load clones..
// this.get('/reposStore').load();
// my vars (dec)
// set gobject values
- var child_0 = new Xcls_Box3( _this );
+ var child_0 = new Xcls_spinner( _this );
child_0.ref();
- this.el.pack_start ( child_0.el , false,false,0 );
- var child_1 = new Xcls_ScrolledWindow5( _this );
+ this.el.add ( child_0.el );
+ var child_1 = new Xcls_toolbar( _this );
child_1.ref();
- this.el.pack_end ( child_1.el , true,true,0 );
+ this.el.pack_start ( child_1.el , false,false,0 );
+ var child_2 = new Xcls_scrolled( _this );
+ child_2.ref();
+ this.el.pack_end ( child_2.el , true,true,0 );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_spinner : Object
+ {
+ public Gtk.Spinner el;
+ private Clones _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_spinner(Clones _owner )
+ {
+ _this = _owner;
+ _this.spinner = this;
+ this.el = new Gtk.Spinner();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.hexpand = true;
+ this.el.vexpand = true;
}
// user defined functions
}
- public class Xcls_Box3 : Object
+
+ public class Xcls_toolbar : Object
{
public Gtk.Box el;
private Clones _this;
// my vars (def)
// ctor
- public Xcls_Box3(Clones _owner )
+ public Xcls_toolbar(Clones _owner )
{
_this = _owner;
+ _this.toolbar = this;
this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
// my vars (dec)
// set gobject values
this.el.homogeneous = true;
- var child_0 = new Xcls_Button4( _this );
+ var child_0 = new Xcls_Button5( _this );
child_0.ref();
this.el.add ( child_0.el );
}
// user defined functions
}
- public class Xcls_Button4 : Object
+ public class Xcls_Button5 : Object
{
public Gtk.Button el;
private Clones _this;
// my vars (def)
// ctor
- public Xcls_Button4(Clones _owner )
+ public Xcls_Button5(Clones _owner )
{
_this = _owner;
this.el = new Gtk.Button();
}
- public class Xcls_ScrolledWindow5 : Object
+ public class Xcls_scrolled : Object
{
public Gtk.ScrolledWindow el;
private Clones _this;
// my vars (def)
// ctor
- public Xcls_ScrolledWindow5(Clones _owner )
+ public Xcls_scrolled(Clones _owner )
{
_this = _owner;
+ _this.scrolled = this;
this.el = new Gtk.ScrolledWindow( null, null );
// my vars (dec)
//listeners
this.el.row_activated.connect( (path, col) => {
- if (col.title != "Current Branch") {
+ if (col.title == "Auto Commit" || col.title == "Auto Push" || col.title == "Auto Branch") {
return;
}
_this.reposStore.el.get_value(iter, 6, out val);
var git_working_dir = (string)val;
- var repo = GitRepo.singleton().get(git_working_dir);
+ var repo = GitRepo.singleton().get_sync(git_working_dir);
Gdk.Rectangle rect;
_this.reposView.el.get_cell_area(path, col, out rect);
_this.reposStore.el.set_value(iter, 4, !bval);
GLib.debug("got repopath? %s", repopath);
- var repo = GitRepo.get(repopath);
+ var repo = GitRepo.get_sync(repopath);
repo.set_autocommit(!bval);
-
-
-
+
});
}
var repopath = (string)rval;
var bval = (bool)val;
_this.reposStore.el.set_value(iter, 5, !bval);
- var repo = GitRepo.get(repopath);
+ var repo = GitRepo.get_sync(repopath);
repo.set_autopush(!bval);
var repopath = (string)rval;
var bval = (bool)val;
_this.reposStore.el.set_value(iter, 8, !bval);
- var repo = GitRepo.get(repopath);
+ var repo = GitRepo.get_sync(repopath);
repo.set_auto_branch(!bval);