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                 BuilderApplication.json_output = true;
17                 Palete.ValaSource.buildApplication();
18                 
19                 GLib.Process.exit(Posix.EXIT_SUCCESS);
20         }
21                 
22         
23         print("project = %s\n", BuilderApplication.opt_compile_project);
24         
25         Gtk.init (ref args);
26         
27         
28         GtkClutter.init (ref args);
29         new JsRender.Lang_Class();
30         GLib.Log.set_always_fatal(LogLevelFlags.LEVEL_ERROR | LogLevelFlags.LEVEL_CRITICAL); 
31         Project.Project.loadAll();
32         /*var proj = Project.Project.getProject("Pman.Core");
33         if (proj == null) {
34                 print("could not load test project Pman.Core");
35                 return 0;
36         }
37         proj.scanDirs();
38         */
39
40         var w = Xcls_MainWindow.singleton();
41         //w.ref();
42         //w.project = proj;
43         
44         w.el.show_all();
45         // it looks like showall after children causes segfault on ubuntu 14.4
46         w.initChildren();
47         w.windowstate.switchState(WindowState.State.FILES);
48         
49         Gtk.main();
50     
51         
52         return 0;
53 }