src/Main.vala
[app.Builder.js] / src / Main.vala
1 /**
2  * Test the writer code...
3
4
5 */
6  
7 int main (string[] args) {
8         
9         
10         
11         
12     
13
14         var app =  BuilderApplication.singleton(  args);
15         if (BuilderApplication.opt_compile_project != null) {
16                  
17                 Palete.ValaSource.buildApplication();
18                 
19                 GLib.Process.exit(Posix.EXIT_SUCCESS);
20         }
21         
22         GLib.Log.set_handler(null, 
23                 GLib.LogLevelFlags.LEVEL_DEBUG | GLib.LogLevelFlags.LEVEL_WARNING, 
24                 (dom, lvl, msg) => {
25                 print("%s: %s\n", dom, msg);
26         });
27         
28         GLib.debug("project = %s\n", BuilderApplication.opt_compile_project);
29         
30         Gtk.init (ref args);
31         
32         
33         GtkClutter.init (ref args);
34         new JsRender.Lang_Class();
35         GLib.Log.set_always_fatal(LogLevelFlags.LEVEL_ERROR | LogLevelFlags.LEVEL_CRITICAL); 
36         Project.Project.loadAll();
37         /*var proj = Project.Project.getProject("Pman.Core");
38         if (proj == null) {
39                 print("could not load test project Pman.Core");
40                 return 0;
41         }
42         proj.scanDirs();
43         */
44
45         var w = Xcls_MainWindow.singleton();
46         //w.ref();
47         //w.project = proj;
48         
49         w.el.show_all();
50         // it looks like showall after children causes segfault on ubuntu 14.4
51         w.initChildren();
52         w.windowstate.switchState(WindowState.State.FILES);
53         
54         Gtk.main();
55     
56         
57         return 0;
58 }