sync
[gitlive] / Gitlive.vala
1
2
3 /*
4  valac  --pkg gio-2.0  --pkg posix  --pkg gtk+-3.0 --pkg libnotify --pkg  libwnck-3.0 \
5       Gitlive.vala \
6       Monitor.vala \
7       GitMonitor.vala \
8       Spawn.vala \
9       StatusIcon.vala \
10       GitRepo.vala \
11     xorg_idletime.c \
12     WindowLog.vala \
13     --Xcc=-lXss \
14     --Xcc=-DWNCK_I_KNOW_THIS_IS_UNSTABLE \
15     -o /tmp/Gitlive && /tmp/Gitlive
16
17
18
19 */
20
21
22
23
24
25 static int main (string[] args) {
26
27         //GLib.Log.set_always_fatal(LogLevelFlags.LEVEL_ERROR | LogLevelFlags.LEVEL_CRITICAL); 
28
29     Gtk.init (ref args);
30     
31     GitMonitor.gitlive =  Environment.get_home_dir() + "/gitlive";
32
33     print("GitMonitor.gitlive=" + GitMonitor.gitlive);
34
35     Notify.init("gitlive");
36
37     new StatusIconA();
38     var gm = new GitMonitor();
39
40
41     Timeout.add_full(Priority.LOW, 500, () => {
42         // this should start after we have shown the icon...
43         print("adding GitMonitor.gitlive: " + GitMonitor.gitlive);
44         gm.add(GitMonitor.gitlive);
45         print("gm.start()");
46         gm.start();
47
48         new WindowLog();
49
50         return false;
51
52     });
53
54     Gtk.main ();
55
56     return 0;
57
58 }