README.txt
[gitlive] / gitlive.js
index f12b63d..173a933 100644 (file)
@@ -15,34 +15,34 @@ GLib        = imports.gi.GLib;
 
 //print(JSON.stringify(GI, null,4));
 // we add this in, as it appears to get lost sometimes if we set it using the ENV. variable in builder.sh
-//GI.Repository.prepend_search_path(GLib.get_home_dir() + '/.Builder/girepository-1.1');
+// see the install instructions on how to override the default gir's
 GIRepository.Repository.prepend_search_path(GLib.get_home_dir() + '/.Builder/girepository-1.2');
 
 var Gio      = imports.gi.Gio;
 var Gtk      = imports.gi.Gtk;
-var Notify = imports.gi.Notify;
-
-var Spawn = imports.Spawn;
-var StatusIcon = imports.StatusIcon.StatusIcon;
-var Monitor = imports.Monitor.Monitor;
+var Notify   = imports.gi.Notify;
+var StatusIcon  = imports.StatusIcon.StatusIcon;
+var Monitor     = imports.Monitor.Monitor;
+var GitMonitor  = imports.GitMonitor.GitMonitor;
+var WindowLog  = imports.WindowLog.WindowLog;
 
 
-//File = imports[__script_path__+'/../introspection-doc-generator/File.js'].File
 Gtk.init (null, null);
 
 // sanity check...
 
-var gitlive = GLib.get_home_dir() + "/gitlive";
+// where is everything..
+GitMonitor.gitlive =  GLib.get_home_dir() + "/gitlive";
 
-if (!GLib.file_test(gitlive, GLib.FileTest.IS_DIR)) {
+if (!GLib.file_test(GitMonitor.gitlive, GLib.FileTest.IS_DIR)) {
     var msg = new Gtk.MessageDialog({message_type:
         Gtk.MessageType.INFO, buttons : Gtk.ButtonsType.OK, text: "GIT Live - ~/gitlive does not exist."});
     msg.run();
     msg.destroy();
-    
     Seed.quit();
 }
-
  
 // I'm lost...
 
@@ -56,8 +56,6 @@ function errorDialog(data) {
     msg.destroy();
 }
 
-
 
 
 //
@@ -69,8 +67,13 @@ StatusIcon.init();
 
 Notify.init("gitlive");
 
-imports.GitMonitor.GitMonitor.add(GLib.get_home_dir() + "/gitlive");
-imports.GitMonitor.GitMonitor.start();
+GLib.timeout_add(GLib.PRIORITY_LOW, 500, function() {
+    // this should start after we have shown the icon...
+    GitMonitor.add(GitMonitor.gitlive);
+    GitMonitor.start();
+    
+    WindowLog.start();
+});
 
 Gtk.main();
 //icon.signal["activate"].connect(on_left_click);