MergeBranch.bjs
[gitlive] / Clones.vala
index 1812b08..b152f76 100644 (file)
@@ -12,6 +12,7 @@ public class Clones : Object
         }
         return _Clones;
     }
+    public Xcls_spinner spinner;
     public Xcls_toolbar toolbar;
     public Xcls_scrolled scrolled;
     public Xcls_reposView reposView;
@@ -69,30 +70,49 @@ public class Clones : Object
 
     // user defined functions
     public void loadAndShow () {
+       
+       _this.el.show_all();
+       
        _this.toolbar.el.hide();
        _this.scrolled.el.hide();
-       _this.progress.el.show();
-       GitRepo.updateAll("show_clones");
+       _this.spinner.el.show();
+       _this.spinner.el.start();       
        
+       GitRepo.updateAll("show_clones");
+       this.el.set_deletable(true);
+        this.el.set_gravity(Gdk.Gravity.NORTH);
+        this.el.move((Gdk.Screen.width() / 2 ) -400 ,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)
+       );
+         
+     
        
        
     }
     public void show ()    {
     
-        GLib.debug("show clones?");
+        this.el.show_all();
+       _this.spinner.el.stop();
+       _this.spinner.el.hide();        
+       _this.toolbar.el.show();
+       _this.scrolled.el.show();       
+     
         this.el.set_deletable(true);
         this.el.set_gravity(Gdk.Gravity.NORTH);
         this.el.move((Gdk.Screen.width() / 2 ) -400 ,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)
        );
          
-        this.el.show_all();
+    
         _this.reposStore.load();
-        this.el.set_keep_above(true);
-            GLib.debug("show clones = run?");
+       
+        GLib.debug("show clones = run?");
         this.el.run();
         // load clones..
     //     this.get('/reposStore').load();
@@ -127,16 +147,44 @@ public class Clones : Object
             // my vars (dec)
 
             // set gobject values
-            var child_0 = new Xcls_toolbar( _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_scrolled( _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_toolbar : Object
     {
         public Gtk.Box el;
@@ -156,14 +204,14 @@ public class Clones : Object
 
             // 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;
@@ -172,7 +220,7 @@ public class Clones : Object
             // my vars (def)
 
         // ctor
-        public Xcls_Button4(Clones _owner )
+        public Xcls_Button5(Clones _owner )
         {
             _this = _owner;
             this.el = new Gtk.Button();