StatusIcon.vala
[gitlive] / StatusIcon.vala
index 9770850..f2d2091 100644 (file)
@@ -71,13 +71,17 @@ public class TestWindow : Window {
 }
 
 
-
+pubic StatusIconA statusicon;
  
 class StatusIconA : StatusIcon {
 
     bool paused = false;
      
     public StatusIconA() {
+        
+        statusicon = this;
+        
+        
          //title : 'gitlive',
         this.stock = Gtk.STOCK_REFRESH;
         this.tooltip_text = "GitLive";
@@ -152,10 +156,35 @@ class StatusIconA : StatusIcon {
                 this.accel_group = null;
                 
                 this.activate.connect( () => {
-                    this.parent.parent.paused = true;
-                    imports.GitMonitor.GitMonitor.stop();
+                    statusicon.paused = true;
+                    
+                    //GitMonitor.GitMonitor.stop();
                    // this.el.label  = status ? 'Resume' : 'Pause';
-                    this.parent.parent.el.set_from_stock( Gtk.STOCK_MEDIA_PAUSE );
+                    statusicon.el.set_from_stock( Gtk.STOCK_MEDIA_PAUSE );
+                    
+                    
+                })
+                //    id : 'pause',
+            }
+            
+            
+        }
+         class ImageMenuItemB : ImageMenuItem {
+            
+            public ImageMenuItemB()
+            {
+                this.set_from_stock( Gtk.STOCK_MEDIA_PLAY );
+                this.label= "Start Commits";
+                this.always_show_image = true;
+                this.accel_group = null;
+                
+                this.activate.connect( () => {
+                    //GitMonitor.GitMonitor.start();
+                    statusicon.paused = false;
+                    
+                    //
+                   // this.el.label  = status ? 'Resume' : 'Pause';
+                    statusicon.el.set_from_stock( Gtk.STOCK_MEDIA_PLAY );
                     
                     
                 })
@@ -164,7 +193,6 @@ class StatusIconA : StatusIcon {
             
             
         }
-        
     }