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

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

index ba4cc8e..f166e70 100644 (file)
     "   // this.name.el.grab_focus();",
     "    ",
     "    ",
-    "    if (c.path.length > 0) {",
+    "    if (!this.is_new) {",
     "\t    this.save_btn.el.set_label(\"Save\");",
     "\t\t_this.filetype_lbl.el.hide();",
     "\t\t_this.filetype.el.hide();",
     "\t\t_this.filetype.showhide(); // as we only work on bjs files currently",
     "    } else {",
     "    ",
-    "\t\t_this.project.loadDirsToStringList(this.dir_model.el, \"\");",
-    "\t\t_this.dir_dropdown.el.selected = Gtk.INVALID_LIST_POSITION;",
+    "\t\t//_this.project.loadDirsToStringList(this.dir_model.el, \"\");",
+    "\t\t//_this.dir_dropdown.el.selected = Gtk.INVALID_LIST_POSITION;",
     "    ",
     "        this.save_btn.el.set_label(\"Create\");",
     "\t    _this.filetype.el.show();",
index fef8ba1..07e6ca7 100644 (file)
            // this.name.el.grab_focus();
             
             
-            if (c.path.length > 0) {
+            if (!this.is_new) {
                    this.save_btn.el.set_label("Save");
                        _this.filetype_lbl.el.hide();
                        _this.filetype.el.hide();
                        _this.filetype.showhide(); // as we only work on bjs files currently
             } else {
             
-                       _this.project.loadDirsToStringList(this.dir_model.el, "");
-                       _this.dir_dropdown.el.selected = Gtk.INVALID_LIST_POSITION;
+                       //_this.project.loadDirsToStringList(this.dir_model.el, "");
+                       //_this.dir_dropdown.el.selected = Gtk.INVALID_LIST_POSITION;
             
                 this.save_btn.el.set_label("Create");
                    _this.filetype.el.show();