Clones.bjs
[gitlive] / Clones.vala
index ae5552f..073cd95 100644 (file)
@@ -55,7 +55,7 @@ public class Clones : Object
     }
 
     // user defined functions
-    public void show () =>  {
+    public void show ()    {
     
         
         this.el.set_deletable(false);
@@ -94,28 +94,29 @@ public class Clones : Object
             // my vars (dec)
 
             // set gobject values
-            var child_0 = new Xcls_HBox3( _this );
+            var child_0 = new Xcls_Box3( _this );
             child_0.ref();
-            this.el.pack_start (  child_0.el , false,true );
+            this.el.pack_start (  child_0.el , false,false,0 );
             var child_1 = new Xcls_ScrolledWindow9( _this );
             child_1.ref();
+            this.el.pack_end (  child_1.el , true,true,0 );
         }
 
         // user defined functions
     }
-    public class Xcls_HBox3 : Object
+    public class Xcls_Box3 : Object
     {
-        public Gtk.HBox el;
+        public Gtk.Box el;
         private Clones  _this;
 
 
             // my vars (def)
 
         // ctor
-        public Xcls_HBox3(Clones _owner )
+        public Xcls_Box3(Clones _owner )
         {
             _this = _owner;
-            this.el = new Gtk.HBox( true, 0 );
+            this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
 
             // my vars (dec)
 
@@ -196,8 +197,7 @@ public class Clones : Object
             
               */   
                 
-                
-                
+                 
             
                    
                 
@@ -297,7 +297,7 @@ public class Clones : Object
             this.el.label = "Merge";
 
             //listeners
-            this.el.clicked.connect( () {
+            this.el.clicked.connect( () =>  {
             /*
                 var rv = this.get('/reposView');
                 var rs = this.get('/reposStore');
@@ -335,11 +335,7 @@ public class Clones : Object
                 
                 
             
-                
-            
-                
-                
-                
+                 
                 
             
              */      
@@ -435,6 +431,7 @@ public class Clones : Object
             // my vars (dec)
 
             // set gobject values
+            this.el.shadow_type = Gtk.ShadowType.IN;
             var child_0 = new Xcls_reposView( _this );
             child_0.ref();
             this.el.add (  child_0.el  );
@@ -443,9 +440,9 @@ public class Clones : Object
 
             // init method
 
-            () => {
-                XObject.prototype.init.call(this);
-                  this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
+            {
+              
+               this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
             }
         }
 
@@ -493,28 +490,20 @@ public class Clones : Object
 
             // init method
 
-            function() {
-                XObject.prototype.init.call(this);
-                    var description = new Pango.FontDescription.c_new();
-               description.set_size(10000);
-                 this.el.modify_font(description);
+            {
+                var selection = this.el.get_selection();
+                selection.set_mode( Gtk.SelectionMode.SINGLE);
             
-                 this.selection = this.el.get_selection();
-                  this.selection.set_mode( Gtk.SelectionMode.MULTIPLE);
-                var _this = this;
-                
-                
-              this.selection.signal['changed'].connect(function() {
-                 _this.listeners.cursor_changed.apply(
-                      _this, [ _this, '']
-                   );
-                         });
-              }
+            
+                var description = new Pango.FontDescription();
+                description.set_size(10000);
+                this.el.override_font(description);
+            }
 
             //listeners
-            this.el.cursor_changed.connect( function (self) {
+            this.el.cursor_changed.connect( ()  => {
               // SEE SELECTION.CHANGED
-              
+              /*
               
               return;
               
@@ -538,7 +527,7 @@ public class Clones : Object
                 // load the list in the right grid..
                  
                 return true;
-            
+            */
             });
         }
 
@@ -557,27 +546,18 @@ public class Clones : Object
         {
             _this = _owner;
             _this.reposStore = this;
-            this.el = new Gtk.ListStore( 0, null );
+            this.el = new Gtk.ListStore( 0,      typeof(string),  // 0 repo
+     typeof(string),  // 1 current branch
+     typeof(string),  // 2 all branch
+     typeof(string),  // 3 updated
+     typeof(bool),   // 4 auto commit
+     typeof(bool),   // 5 auto push
+     typeof(string)   // 7 repopath
+      typeof(string)   // 8 color highlighting? );
 
             // my vars (dec)
 
             // set gobject values
-
-            // init method
-
-            function() {
-                XObject.prototype.init.call(this);
-                this.el.set_column_types ( 8, [
-                   GObject.TYPE_STRING, // repo  
-                  GObject.TYPE_STRING, // current branch
-                  GObject.TYPE_STRING, // all branch      
-                  GObject.TYPE_STRING, // updated
-                   GObject.TYPE_BOOLEAN, // auto-commit
-                    GObject.TYPE_BOOLEAN, // auto-push
-                       GObject.TYPE_STRING, // repopath
-                       GObject.TYPE_STRING // color highighling 
-              ] );
-            }
         }
 
         // user defined functions
@@ -604,16 +584,12 @@ public class Clones : Object
             this.el.min_width = 50;
             var child_0 = new Xcls_CellRendererToggle13( _this );
             child_0.ref();
-            this.el.pack_start (  child_0.el  );
+            this.el.pack_start (  child_0.el , false );
 
             // init method
 
-            function() {
-                XObject.prototype.init.call(this);
-                this.el.add_attribute(this.items[0].el , 'active', 4 );
-                this.items[0].el.set_activatable(true);
-            
-            }
+            //    this.items[0].el.set_activatable(true);
+             this.el.add_attribute(_this.keyrender.el , "active", 4 );
         }
 
         // user defined functions
@@ -638,8 +614,8 @@ public class Clones : Object
             this.el.mode = Gtk.CellRendererMode.ACTIVATABLE;
 
             //listeners
-            this.el.toggled.connect( function (self, path) {
-                var ret ={} ;
+            this.el.toggled.connect( (self, path)  => {
+            /*    var ret ={} ;
                 var store = this.get('/reposStore');
                 store.el.get_iter_from_string(ret, path);
                                                                              
@@ -651,7 +627,7 @@ public class Clones : Object
                  var path =  store.el.get_value(ret.iter, 6).value.get_string();
                  var repo = imports.Scm.Repo.Repo.get(path);
                  repo.autocommit(!value);
-                 
+              */   
                 
                 
             });