src/Builder4/ClutterFiles.bjs
authorAlan Knowles <alan@roojs.com>
Mon, 1 Jun 2015 10:23:33 +0000 (18:23 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 1 Jun 2015 10:23:33 +0000 (18:23 +0800)
src/Builder4/ClutterFiles.vala

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

index d608441..d70a808 100644 (file)
@@ -88,8 +88,8 @@
        "items" : [
         {
          "id" : "filelayout_manager",
-         "bool homogeneous" : false,
          "$ orientation" : "Clutter.FlowOrientation.HORIZONTAL",
+         "bool homogeneous" : false,
          "xtype" : "FlowLayout",
          "float max_column_width" : "100.0f",
          "$ xns" : "Clutter",
           },
           {
            "* ctor" : "new Clutter.Text.full(\"Sans 10px\", file.nickType(),  Clutter.Color.from_string(\"#fff\"))",
-           "* args" : "JsRender.JsRender file",
            "id" : "+typetitle",
+           "* args" : "JsRender.JsRender file",
            "* pack" : "add_child",
            "xtype" : "Text",
            "bool x_expand" : false,
           },
           {
            "* ctor" : "new Clutter.Text.full(\"Sans 10px\", file.nickName(),  Clutter.Color.from_string(\"#fff\"))",
-           "* args" : "JsRender.JsRender file",
            "id" : "+title",
+           "* args" : "JsRender.JsRender file",
            "* pack" : "add_child",
            "xtype" : "Text",
            "bool x_expand" : false,
           },
           {
            "* ctor" : "new Clutter.Text.full(\"Sans bold 14px\", GLib.Path.get_basename(folderpath),  Clutter.Color.from_string(\"#fff\"))",
-           "id" : "+foldertitle",
            "* args" : "string folderpath",
+           "id" : "+foldertitle",
            "$ x_expand" : true,
            "* pack" : "add_child",
            "xtype" : "Text",
             "enter_event" : "(  event)  => {\n    this.el.background_color =   Clutter.Color.from_string(\"#fff\");\n    this.el.color =  Clutter.Color.from_string(\"#000\");\n        return false;\n}",
             "leave_event" : "(  event)  => {\n    this.el.background_color =   Clutter.Color.from_string(\"#000\");\n     this.el.color =   Clutter.Color.from_string(\"#fff\");\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",
-           "* init" : "{\n    this.filepath = filepath;\n}\n",
            "$ x_expand" : true,
-           "* pack" : "add_child",
            "xtype" : "Text",
            "$ y_align" : "Clutter.ActorAlign.START",
-           "string filepath" : "",
            "$ xns" : "Clutter",
-           "bool reactive" : true,
            "bool y_expand" : false,
            "$ x_align" : "Clutter.ActorAlign.START"
           }
index 9a648b4..be7aa9a 100644 (file)
@@ -719,6 +719,8 @@ public class Xcls_ClutterFiles : Object
             child_1.ref();
             this.el.add_child (  child_1.el  );
             this.foldertitle =  child_1;
+            var child_2 = new Xcls_Text18( _this );
+            child_2.ref();
 
             // init method
 
@@ -777,20 +779,19 @@ public class Xcls_ClutterFiles : Object
         // user defined functions
     }
 
-    public class Xcls_folderfile : Object
+    public class Xcls_Text18 : Object
     {
         public Clutter.Text el;
         private Xcls_ClutterFiles  _this;
 
 
             // my vars (def)
-        public string filepath;
 
         // ctor
-        public Xcls_folderfile(Xcls_ClutterFiles _owner , string filepath)
+        public Xcls_Text18(Xcls_ClutterFiles _owner )
         {
             _this = _owner;
-            this.el = new Clutter.Text.full("Sans 10px", GLib.Path.get_basename(filepath),  Clutter.Color.from_string("#fff"));
+            this.el = new Clutter.Text();
 
             // my vars (dec)
 
@@ -798,15 +799,8 @@ public class Xcls_ClutterFiles : Object
             this.el.x_align = Clutter.ActorAlign.START;
             this.el.x_expand = true;
             this.el.y_align = Clutter.ActorAlign.START;
-            this.el.reactive = true;
             this.el.y_expand = false;
 
-            // init method
-
-            {
-                this.filepath = filepath;
-            }
-
             //listeners
             this.el.button_press_event.connect( (  event) => {