- /* var ret ={} ;
- var store = this.get('/reposStore');
- store.el.get_iter_from_string(ret, path);
-
- var value = store.el.get_value(ret.iter,5).value.get_boolean();
-
- //print(JSON.stringify(value));
- store.el.set_value(ret.iter,5, !value);
- var path = store.el.get_value(ret.iter, 6).value.get_string();
- var repo = imports.Scm.Repo.Repo.get(path);
- repo.autopush(!value);
- */
+
+ Gtk.TreeIter iter;
+ _this.reposStore.el.get_iter_from_string(out iter, path);
+
+ GLib.Value val;
+ GLib.Value rval;
+ _this.reposStore.el.get_value(iter, 5, out val);
+ _this.reposStore.el.get_value(iter, 6, out rval);
+
+ var repopath = (string)rval;
+ var bval = (bool)val;
+ _this.reposStore.el.set_value(iter, 5, !bval);
+ var repo = GitRepo.get(repopath);
+ repo.set_autopush(!bval);
+
+
+
+
+ });
+ }
+
+ // user defined functions
+ }
+
+
+ public class Xcls_tv_autobranch : Object
+ {
+ public Gtk.TreeViewColumn el;
+ private Clones _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_tv_autobranch(Clones _owner )
+ {
+ _this = _owner;
+ _this.tv_autobranch = this;
+ this.el = new Gtk.TreeViewColumn();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.title = "Auto Branch";
+ this.el.min_width = 50;
+ var child_0 = new Xcls_cr_autobranch( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , false );
+
+ // init method
+
+ this.el.add_attribute(_this.cr_autobranch.el , "active", 8 );
+ // this.items[0].el.set_activatable(true);
+ }
+
+ // user defined functions
+ }
+ public class Xcls_cr_autobranch : Object
+ {
+ public Gtk.CellRendererToggle el;
+ private Clones _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_cr_autobranch(Clones _owner )
+ {
+ _this = _owner;
+ _this.cr_autobranch = this;
+ this.el = new Gtk.CellRendererToggle();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.mode = Gtk.CellRendererMode.ACTIVATABLE;
+
+ //listeners
+ this.el.toggled.connect( (self, path) => {
+
+ Gtk.TreeIter iter;
+ _this.reposStore.el.get_iter_from_string(out iter, path);
+
+ GLib.Value val;
+ GLib.Value rval;
+ _this.reposStore.el.get_value(iter, 8, out val);
+ _this.reposStore.el.get_value(iter, 6, out rval);
+
+ var repopath = (string)rval;
+ var bval = (bool)val;
+ _this.reposStore.el.set_value(iter, 8, !bval);
+ var repo = GitRepo.get(repopath);
+ repo.set_auto_branch(!bval);
+
+
+
+