//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);
-var gitlive = GLib.get_home_dir() + "/gitlive";
+// sanity check...
-if (!GLib.file_test(gitlive, GLib.FileTest.IS_DIR)) {
+// where is everything..
+GitMonitor.gitlive = GLib.get_home_dir() + "/gitlive";
+
+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...
function errorDialog(data) {
var msg = new Gtk.MessageDialog({
msg.destroy();
}
-
-
//
Notify.init("gitlive");
-monitor.add(GLib.get_home_dir() + "/gitlive");
-monitor.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);