StatusIcon.vala
[gitlive] / StatusIcon.vala
index fcad927..8a76e5d 100644 (file)
@@ -23,52 +23,14 @@ using Gtk;
 static int main (string[] args) {
     // A reference to our file
     Gtk.init (ref args);
-
-    var window = new TestWindow();
-    
-    window.show_all ();
-
+    new StatusIcon();
     Gtk.main ();
     return 0;
      
 
 }
-
-public class TestButton : Button {
-    public TestButton()
-    {
-        this.set_label("Click me");
-        
-        
-        this.clicked.connect (() => {
-            this.label = "Thank you";
-        });
-        
-    }
-    
-    
-}
-
-public class TestWindow : Window {
-
-    public TestWindow() {
-         this.title = "First GTK+ Program";
-        this.border_width = 10;
-        this.window_position = WindowPosition.CENTER;
-        this.set_default_size (350, 70);
-        
-        // -- connect all
-        this.destroy.connect (Gtk.main_quit);        
-        
-        // add children..
-        this.add(new TestButton());
-
-    }
-   
-    
  
-   
-}
 
 
 pubic StatusIconA statusicon;
@@ -194,53 +156,9 @@ class StatusIconA : StatusIcon {
             
         }
     }
+}
     
-         
-    items : [
-       {
-            xtype: Gtk.Menu,
-            id : 'menu',
-            pack: false,
-            items : [
-                {
-                    
-                    //label: 'Pause',
-                    pack:  'append',
-                    listeners : {
-                        activate : function () {
-                            this.parent.parent.paused = true;
-                            imports.GitMonitor.GitMonitor.stop();
-                           // this.el.label  = status ? 'Resume' : 'Pause';
-                            this.parent.parent.el.set_from_stock( Gtk.STOCK_MEDIA_PAUSE );
-                            
-                        }
-                    }
-                },
-                
-                {
-                    init : function() {
-                        this.el = XObject.isSeed ?
-                            new Gtk.ImageMenuItem.from_stock(Gtk.STOCK_MEDIA_PLAY)
-                            : new Gtk.ImageMenuItem.new_from_stock(Gtk.STOCK_MEDIA_PLAY, null);
-                        XObject.prototype.init.call(this);
-                    },
-                    label: 'Resume Commits',
-                    always_show_image : true,
-                    accel_group : null,
-                    id : 'resume',
-                    //label: 'Pause',
-                    pack:  'append',
-                    listeners : {
-                        activate : function () {
-                            this.parent.parent.paused = false;
-                             imports.GitMonitor.GitMonitor.start();
-                            //var status = this.el.label == 'Pause' ? 1 : 0
-                           // this.el.label  = status ? 'Resume' : 'Pause';
-                               
-                            
-                        }
-                    }
-                },
+    /*
                 
                 {
                     init : function() {