src/Builder4/ClutterFiles.bjs
authorAlan Knowles <alan@roojs.com>
Fri, 22 May 2015 09:39:24 +0000 (17:39 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 22 May 2015 09:39:24 +0000 (17:39 +0800)
src/Builder4/ClutterFiles.vala

src/Builder4/ClutterFiles.bjs
src/Builder4/ClutterFiles.vala

index 7d803ef..c678d2e 100644 (file)
            "$ x_align" : "Clutter.ActorAlign.START"
           },
           {
+           "listeners" : {
+            "button_press_event" : "  (  event) => {\n    _this.open(this.filepath);\n    return false;\n} "
+           },
            "* ctor" : "new Clutter.Text.full(\"Sans 10px\", GLib.Path.get_basename(filepath),  Clutter.Color.from_string(\"#fff\"))",
            "id" : "*folderfile",
            "* args" : "string filepath",
index 98eb372..178a823 100644 (file)
@@ -723,6 +723,12 @@ public class Xcls_ClutterFiles : Object
             this.el.x_expand = true;
             this.el.y_align = Clutter.ActorAlign.START;
             this.el.y_expand = true;
+
+            //listeners
+            this.el.button_press_event.connect( (  event) => {
+                _this.open(this.filepath);
+                return false;
+            });
         }
 
         // user defined functions