Revision: 2397
          http://vexi.svn.sourceforge.net/vexi/?rev=2397&view=rev
Author:   clrg
Date:     2007-10-01 17:32:04 -0700 (Mon, 01 Oct 2007)

Log Message:
-----------
Fix iconfill property on tree - set iconfill for custom tree icons

Modified Paths:
--------------
    trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/tree.t
    trunk/widgets/org.vexi.widgets/src/org/vexi/theme/win2k/tree.t

Modified: trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/tree.t
===================================================================
--- trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/tree.t       
2007-10-01 23:05:48 UTC (rev 2396)
+++ trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/tree.t       
2007-10-02 00:32:04 UTC (rev 2397)
@@ -16,7 +16,7 @@
         thisbox.th_title;
         
         thisbox.v_iconinit = false;
-        thisbox.v_istree = true;
+        thisbox.v_is_tree = true;
         thisbox.v_self ++= function() { return thisbox; }
         
         thisbox.expanded = true;
@@ -30,7 +30,7 @@
         thisbox.v_nodePress = function(v) { selected = true; cascade = v; }
         
         thisbox.v_childrenWrite = function(c) {
-            if (c and c.v_istree) {
+            if (c and c.v_is_tree) {
                 var cself = c.v_self;
                 // we have no group
                 if (!groupref) {
@@ -55,7 +55,7 @@
                         var node = thisbox;
                         insafter = thisbox;
                         for (var i=thisbox.numchildren-1; i>=0; i--) {
-                           if (node[i].v_istree) {
+                           if (node[i].v_is_tree) {
                                insafter = node[i].v_self;
                                if (node[i].numchildren) {
                                    node = node[i];
@@ -77,14 +77,14 @@
                     }
                 }
             }
-            var _c = trapee[trapname];
-            if (c == null and _c != null) {
+            var r = trapee[trapname];
+            if (c == null and r != null) {
                 // remove from this tree
-                if (_c.v_istree) {
+                if (r.v_is_tree) {
                     // FIXME: split groups
-                    _c.v_self.groupref = null;
-                    _c.v_self.nexttree --= nexttreeChildRead;
-                    _c.v_self.prevtree --= prevtreeChildRead;
+                    r.v_self.groupref = null;
+                    r.v_self.nexttree --= nexttreeChildRead;
+                    r.v_self.prevtree --= prevtreeChildRead;
                 }
             }
             cascade = c;
@@ -95,7 +95,6 @@
         thisbox.expanded   ++= static.expandWrite;
         thisbox.iconfill   ++= static.iconWrite;
         thisbox.icontemplate ++= static.iconWrite;
-        thisbox.v_iconinit ++= static.iconinitWrite;
         thisbox.nextselect ++= static.nextselectRead;
         thisbox.prevselect ++= static.prevselectRead;
         thisbox.th_content ++= static.contentWrite;
@@ -103,7 +102,8 @@
         thisbox.th_node    ++= static.nodeWrite;
         thisbox.th_title   ++= static.titleWrite;
         thisbox.visible    ++= static.visibleWrite;
-        thisbox.KeyPressed ++= static.keypressWrite;
+        thisbox.v_iconinit ++= static.iconinitWrite;
+        thisbox.KeyPressed ++= static.keypressEvent;
         
     </ui:box>
     
@@ -120,7 +120,7 @@
             if (icon[0]) icon[0] = null;
             icon[0] = t.icontemplate(vexi.box);
         } else {
-            icon.fill = t.th_iconfill;
+            icon.fill = t.iconfill;
             if (icon[0]) icon[0] = null;
         }
         cascade = v;
@@ -182,7 +182,7 @@
         v.DoubleClick1 ++= trapee.v_flipDisplay;
     }
     
-    static.keypressWrite = function(v) {
+    static.keypressEvent = function(v) {
         var t = trapee;
         if (v == "left") t.th_expand.display = false;
         else if (v == "right") {

Modified: trunk/widgets/org.vexi.widgets/src/org/vexi/theme/win2k/tree.t
===================================================================
--- trunk/widgets/org.vexi.widgets/src/org/vexi/theme/win2k/tree.t      
2007-10-01 23:05:48 UTC (rev 2396)
+++ trunk/widgets/org.vexi.widgets/src/org/vexi/theme/win2k/tree.t      
2007-10-02 00:32:04 UTC (rev 2397)
@@ -40,10 +40,11 @@
         thisbox.th_focus = $focus;
         thisbox.th_handle = $handle;
         thisbox.th_icon = $image;
-        thisbox.th_iconfill = .image.tree_folder;
         thisbox.th_node = $node;
         thisbox.th_title = $label;
         
+        thisbox.iconfill = .image.tree_folder;
+        
         /** show focusborder when selected */
         thisbox.focused ++= function(v)
         {


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to