Fix #8101 - new roo bjs files fail and fix top drop
[roobuilder] / src / Application.vala
index dd2c634..9ba9057 100644 (file)
@@ -1,5 +1,5 @@
 
+ /*
        public class AppSettings : Object
        {
 
@@ -46,7 +46,7 @@
 
                
        }
-       
+       */
        
        public static BuilderApplication application = null;
        
                    { "application/x-rootwindow-drop", 0, Target.ROOTWIN }
                };
                */
-               public AppSettings settings = null;
+               //public AppSettings settings = null;
 
 
 
                        
                        
                        configDirectory();
-                       this.settings = AppSettings.factory();  
+               //      this.settings = AppSettings.factory();  
                        var opt_context = new OptionContext ("Application Builder");
                        
                        try {
 
                }
 
+               public static Settings settings;
 
+               protected override void activate () 
+               {
+                       var css = new Gtk.CssProvider();
+                       css.load_from_resource("/css/roobuilder.css");
+                       
+                       Gtk.StyleContext.add_provider_for_display(
+                               Gdk.Display.get_default(),
+                               css     ,
+                               Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION
+                       );
+                       BuilderApplication.settings = new Settings();
+               
+                       var w = new Xcls_MainWindow();
+                   w.initChildren();
+                       BuilderApplication.addWindow(w);
+                       
+                       // it looks like showall after children causes segfault on ubuntu 14.4
+                       w.windowstate.init();
+               //      w.windowstate.showPopoverFiles(w.open_projects_btn.el, null, false);
+                       w.show();
+               
+               }
                
                public static BuilderApplication  singleton(  string[]? args)
                {
                                GLib.error("need a project %s, to use --drop-list",BuilderApplication.opt_compile_project);
                         }
                          if (cur_project.xtype != "Gtk") {
-                               GLib.error("need a Gtk project %s, to use --drop-list",BuilderApplication.opt_compile_project);
+                                var rp = (Palete.Roo) cur_project.palete;
+                               print("\n\nDropList:\n%s", geeArrayToString(rp.getDropList(BuilderApplication.opt_drop_list)));
+                                print("\n\nChildList:\n%s", geeArrayToString(rp.getChildList(BuilderApplication.opt_drop_list, false)));
+                                print("\n\nChildList \n(with props): %s", geeArrayToString(rp.getChildList(BuilderApplication.opt_drop_list, true)));  
+                                
+                                
+                                print("\n\nPropsList: %s", this.girArrayToString(rp.getPropertiesFor( BuilderApplication.opt_drop_list, JsRender.NodePropType.PROP)));
+                                print("\n\nSignalList: %s", this.girArrayToString(rp.getPropertiesFor( BuilderApplication.opt_drop_list, JsRender.NodePropType.LISTENER)));
+                                
+                                // ctor.
+                                 print("\n\nCtor Values: %s", rp.fqnToNode(BuilderApplication.opt_drop_list).toJsonString());
+                                GLib.Process.exit(Posix.EXIT_SUCCESS);
+                         
+                         
+                        
                         }
                         var p = (Palete.Gtk) cur_project.palete;
                        
@@ -721,7 +758,7 @@ flutter-project  -  was try and read flutter data (but desnt work.)
 
                                ww.windowstate.updateErrorMarksAll();
                                 
-                               GLib.debug("calling udate Errors of window %s", ww.windowstate.file.targetName());
+                               //GLib.debug("calling udate Errors of window %s", ww.windowstate.file.targetName());
                                ww.updateErrors();
                                ww.windowstate.left_tree.updateErrors();
                                ww.windowstate.left_props.updateErrors();
@@ -745,6 +782,10 @@ flutter-project  -  was try and read flutter data (but desnt work.)
                                                BuilderApplication.showSpinner( "format-justify-fill", msg);                                    
                                                return;
 
+                                       case Palete.LanguageClientAction.DIAG_END:
+                                               BuilderApplication.showSpinner( "", "");
+                                               return;
+
                                        case Palete.LanguageClientAction.OPEN:
                                                BuilderApplication.showSpinner( "document-open", msg);                                  
                                                return;