README.txt
[gitlive] / GitMonitor.js
index 923a5e8..df3565a 100644 (file)
@@ -52,6 +52,19 @@ var GitMonitor = new Monitor({
         GLib.timeout_add(GLib.PRIORITY_LOW, 500, function() {
             _this.top.forEach(_this.monitor, _this);
             imports.StatusIcon.StatusIcon.el.set_from_stock( Gtk.STOCK_MEDIA_PLAY );
+            
+            try { 
+                var notification = new Notify.Notification({
+                    summary: "Git Live",
+                    body : this.gitlive + "\nMonitoring " + _this.monitors.length + " Directories",
+                    timeout : 5
+                });
+        
+                notification.set_timeout(5);
+                notification.show();
+            } catch(e) {
+                print(e.toString());
+            }
 
         });
         
@@ -74,23 +87,12 @@ var GitMonitor = new Monitor({
             return 1;
         },null,null);
         
-        try { 
-            var notification = new Notify.Notification({
-                summary: "Git Live",
-                body : this.gitlive + "\nMonitoring " + this.monitors.length + " Directories",
-                timeout : 5
-            });
-    
-            notification.set_timeout(5);
-            notification.show();
-        } catch(e) {
-            print(e.toString());
-        }
+      
     },
     
     
     stop: function() {
-        this.parent.parent.el.set_from_stock( Gtk.STOCK_MEDIA_PAUSE );
+        imports.StatusIcon.StatusIcon.el.set_from_stock( Gtk.STOCK_MEDIA_PAUSE );
         Monitor.prototype.stop.call(this);
     },