src/Builder4/PopoverFileDetails.bjs
authorAlan <alan@roojs.com>
Thu, 4 Jan 2024 10:18:35 +0000 (18:18 +0800)
committerAlan <alan@roojs.com>
Thu, 4 Jan 2024 10:18:35 +0000 (18:18 +0800)
src/Builder4/PopoverFileDetails.vala

src/Builder4/PopoverFileDetails.bjs
src/Builder4/PopoverFileDetails.vala

index ab2adc3..0488f0b 100644 (file)
           "()   {",
           "",
           "",
-          "\t",
+          "\t_this.path_lbl.el.hide();",
+          "    _this.path.el.hide();",
+          "    ",
+          "    _this.dir_dropdown_lbl.el.hide();",
+          "    _this.dir_dropdown.el.hide();",
           "\t",
           "\t_this.title_lbl.el.hide();",
           "\t_this.title.el.hide();",
           "\tif (_this.file == null && sel == \"\" && _this.project.xtype ==\"Gtk\") {",
           "\t\treturn;",
           "\t}",
-          "\t",
+          " ",
+          "    if (c.name == \"\") {",
+          "    \t_this.path_lbl.el.hide();",
+          "\t    _this.path.el.hide();",
+          "\t    this.filetype_model.load();",
+          "        _this.dir_dropdown_lbl.el.show();",
+          "\t    _this.dir_dropdown.el.show();",
+          "\t    ",
+          "    }   else {",
+          "        _this.path.el.set_text(c.relpath);",
+          "    }",
+          "    ",
           "\t",
           "\t",
           "\t",
    "uint border_width" : 0,
    "xtype" : "Window",
    "| void show" : [
-    "(JsRender.JsRender c, Gtk.Window pwin, bool new_window) ",
+    "(JsRender.JsRender? c, Gtk.Window pwin, bool new_window) ",
     "{",
     "    ",
     "    this.project = c.project;",
index 75dae74..261e1c1 100644 (file)
@@ -79,7 +79,7 @@
         }
 
         // user defined functions
-        public void show (JsRender.JsRender c, Gtk.Window pwin, bool new_window) 
+        public void show (JsRender.JsRender? c, Gtk.Window pwin, bool new_window) 
         {
             
             this.project = c.project;
             public void showhide ()   {
             
             
-               
+               _this.path_lbl.el.hide();
+                _this.path.el.hide();
+                
+                _this.dir_dropdown_lbl.el.hide();
+                _this.dir_dropdown.el.hide();
                
                _this.title_lbl.el.hide();
                _this.title.el.hide();
                if (_this.file == null && sel == "" && _this.project.xtype =="Gtk") {
                        return;
                }
-               
+             
+                if (c.name == "") {
+                       _this.path_lbl.el.hide();
+                   _this.path.el.hide();
+                   this.filetype_model.load();
+                    _this.dir_dropdown_lbl.el.show();
+                   _this.dir_dropdown.el.show();
+                   
+                }   else {
+                    _this.path.el.set_text(c.relpath);
+                }
+