hide the file navigation on re-open of non-gtk projects
authorAlan <alan@roojs.com>
Wed, 17 Aug 2022 08:33:34 +0000 (16:33 +0800)
committerAlan <alan@roojs.com>
Wed, 17 Aug 2022 08:33:34 +0000 (16:33 +0800)
src/Builder4/PopoverFiles.bjs
src/Builder4/PopoverFiles.vala

index b3317fe..5f2c0c5 100644 (file)
     ""
    ],
    "| void onProjectSelected" : [
-    "(Project.Project project) {",
+    "(Project.Project project) ",
+    "{",
     "\tthis.selectedProject = project;",
     "\tproject.scanDirs();",
     "\t//this.clutterfiles.loadProject(proj);",
     "\tthis.new_window = new_window;",
     "\t\t// save...",
     "\tthis.load();",
+    "\tthis.el.show_all(); // show first - so we can hide stuff later.\t",
     "\tif (project != null) {",
+    "\t",
     "\t\tthis.selectProject(project);",
     "\t}",
     "\t",
     "\tthis.el.set_modal(true);",
     "\tthis.el.set_relative_to(on_el);",
     "",
-    "\t//this.el.set_position(Gtk.PositionType.BOTTOM);",
-    "",
-    "\t// window + header?",
-    " ",
-    "\tthis.el.show_all();",
-    "    //while(Gtk.events_pending()) { ",
-    "    //        Gtk.main_iteration();   // why?",
-    "    //}  ",
+    "\t ",
     "",
     "}",
     ""
index 8309ef3..26b85b4 100644 (file)
@@ -68,7 +68,8 @@ public class Xcls_PopoverFiles : Object
     }
 
     // user defined functions
-    public void onProjectSelected (Project.Project project) {
+    public void onProjectSelected (Project.Project project) 
+    {
        this.selectedProject = project;
        project.scanDirs();
        //this.clutterfiles.loadProject(proj);
@@ -228,7 +229,9 @@ public class Xcls_PopoverFiles : Object
        this.new_window = new_window;
                // save...
        this.load();
+       this.el.show_all(); // show first - so we can hide stuff later. 
        if (project != null) {
+       
                this.selectProject(project);
        }
        
@@ -251,14 +254,7 @@ public class Xcls_PopoverFiles : Object
        this.el.set_modal(true);
        this.el.set_relative_to(on_el);
     
-       //this.el.set_position(Gtk.PositionType.BOTTOM);
-    
-       // window + header?
-     
-       this.el.show_all();
-        //while(Gtk.events_pending()) { 
-        //        Gtk.main_iteration();   // why?
-        //}  
+        
     
     }
     public void load () {