src/Builder4/MainWindow.bjs
authorAlan Knowles <alan@roojs.com>
Thu, 1 Feb 2024 06:11:36 +0000 (14:11 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 1 Feb 2024 06:11:36 +0000 (14:11 +0800)
src/Builder4/MainWindow.vala

src/Builder4/MainWindow.bjs
src/Builder4/MainWindow.vala

index e1575bc..18fb162 100644 (file)
                 "notify[\"selected\"]" : [
                  "() => {",
                  "\tif (this.el.selected == Gtk.INVALID_LIST_POSITION) {",
-                 "\t\tif (_this.iconsel.el.selected == Gtk.INVALID_LIST_POSITION) {",
-                 "\t\t\t_this.btn_delfile.el.hide();",
-                 "\t\t}",
+                 "\t\t",
                  "\t\treturn;",
                  "\t}",
                  "\t",
                  "\tvar tr = (Gtk.TreeListRow)_this.treeselmodel.el.selected_item;",
                  "\tGLib.debug(\"SELECTED = %s\", tr.item.get_type().name());",
                  "\tvar f = (JsRender.JsRender) tr.item;",
-                 "\tif (f.xtype == \"Dir\") {",
-                 "\t\t_this.btn_delfile.el.hide();\t",
-                 "\t} else {",
-                 "\t\t_this.btn_delfile.el.show();",
-                 "\t}",
-                 "",
-                 "\t_this.iconsel.el.selected = Gtk.INVALID_LIST_POSITION;",
-                 "",
+                 "\t ",
+                 " ",
                  "",
                  "}",
                  " ",
index 4877875..7735549 100644 (file)
@@ -2146,23 +2146,15 @@ public class Xcls_MainWindow : Object
                        //listeners
                        this.el.notify["selected"].connect( () => {
                                if (this.el.selected == Gtk.INVALID_LIST_POSITION) {
-                                       if (_this.iconsel.el.selected == Gtk.INVALID_LIST_POSITION) {
-                                               _this.btn_delfile.el.hide();
-                                       }
+                                       
                                        return;
                                }
                                
                                var tr = (Gtk.TreeListRow)_this.treeselmodel.el.selected_item;
                                GLib.debug("SELECTED = %s", tr.item.get_type().name());
                                var f = (JsRender.JsRender) tr.item;
-                               if (f.xtype == "Dir") {
-                                       _this.btn_delfile.el.hide();    
-                               } else {
-                                       _this.btn_delfile.el.show();
-                               }
-                       
-                               _this.iconsel.el.selected = Gtk.INVALID_LIST_POSITION;
-                       
+                                
+                        
                        
                        });
                }