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