Gitlive.vala
[gitlive] / Gitlive.vala
index 424565b..922940c 100644 (file)
@@ -1,8 +1,8 @@
 
 
 /*
- valac  --pkg gio-2.0  --pkg posix  --pkg gtk+-3.0 
-      GitLive.vala \
+ valac  --pkg gio-2.0  --pkg posix  --pkg gtk+-3.0 --pkg libnotify \
+      Gitlive.vala \
       Monitor.vala \
       GitMonitor.vala \
       Spawn.vala \
 static int main (string[] args) {
     Gtk.init (ref args);
     
-    GitMonitor.gitlive =  GLib.get_home_dir() + "/gitlive";
+    GitMonitor.gitlive =  Environment.get_home_dir() + "/gitlive";
 
     Notify.init("gitlive");
 
     StatusIcon.init();
 
 
-
-
-    MainLoop loop = new MainLoop ();
-    print("starting");
-    var m = new Monitor();
-    
-    m.add("/home/alan/gitlive");
-    m.start();
-    loop.run ();
+    GLib.timeout_add(GLib.PRIORITY_LOW, 500, () => {
+        // this should start after we have shown the icon...
+        GitMonitor.add(GitMonitor.gitlive);
+        GitMonitor.start();
+        
+        // WindowLog.start();
+    });
 
     Gtk.main ();