2 ///<script type="text/javascript">
6 * inotify hooks for ~/gitlive
7 * that commit and push any changes made.
8 * Bit like a revision controled backed up file system!?
13 GIRepository = imports.gi.GIRepository
14 GLib = imports.gi.GLib;
16 //print(JSON.stringify(GI, null,4));
17 // we add this in, as it appears to get lost sometimes if we set it using the ENV. variable in builder.sh
18 // see the install instructions on how to override the default gir's
19 GIRepository.Repository.prepend_search_path(GLib.get_home_dir() + '/.Builder/girepository-1.2');
21 var Gio = imports.gi.Gio;
22 var Gtk = imports.gi.Gtk;
23 var Notify = imports.gi.Notify;
26 var StatusIcon = imports.StatusIcon.StatusIcon;
27 var Monitor = imports.Monitor.Monitor;
28 var GitMonitor = imports.GitMonitor.GitMonitor;
29 var WindowLog = imports.WindowLog.WindowLog;
32 Gtk.init (null, null);
36 // where is everything..
37 GitMonitor.gitlive = GLib.get_home_dir() + "/gitlive";
39 if (!GLib.file_test(GitMonitor.gitlive, GLib.FileTest.IS_DIR)) {
40 var msg = new Gtk.MessageDialog({message_type:
41 Gtk.MessageType.INFO, buttons : Gtk.ButtonsType.OK, text: "GIT Live - ~/gitlive does not exist."});
49 function errorDialog(data) {
50 var msg = new Gtk.MessageDialog({
51 message_type: Gtk.MessageType.ERROR,
52 buttons : Gtk.ButtonsType.OK,
62 // need a better icon...
68 Notify.init("gitlive");
70 GLib.timeout_add(GLib.PRIORITY_LOW, 500, function() {
71 // this should start after we have shown the icon...
72 GitMonitor.add(GitMonitor.gitlive);
79 //icon.signal["activate"].connect(on_left_click);