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 //GI.Repository.prepend_search_path(GLib.get_home_dir() + '/.Builder/girepository-1.1');
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;
25 var Spawn = imports.Spawn;
26 var StatusIcon = imports.StatusIcon.StatusIcon;
27 var Monitor = imports.Monitor.Monitor;
30 //File = imports[__script_path__+'/../introspection-doc-generator/File.js'].File
31 Gtk.init (null, null);
35 var gitlive = GLib.get_home_dir() + "/gitlive";
37 if (!GLib.file_test(gitlive, GLib.FileTest.IS_DIR)) {
38 var msg = new Gtk.MessageDialog({message_type:
39 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,
64 // need a better icon...
70 Notify.init("gitlive");
72 imports.GitMonitor.GitMonitor.add(GLib.get_home_dir() + "/gitlive");
73 imports.GitMonitor.GitMonitor.start();
76 //icon.signal["activate"].connect(on_left_click);