Revision: 3857
          http://vexi.svn.sourceforge.net/vexi/?rev=3857&view=rev
Author:   clrg
Date:     2010-07-01 02:33:10 +0000 (Thu, 01 Jul 2010)

Log Message:
-----------
Syntax/whitespace only

Modified Paths:
--------------
    trunk/widgets/org.vexi.widgets/src/org/vexi/lib/layout/container.t
    trunk/widgets/org.vexi.widgets/src/org/vexi/lib/text/block.t
    trunk/widgets/org.vexi.widgets/src/org/vexi/lib/text/default.t

Modified: trunk/widgets/org.vexi.widgets/src/org/vexi/lib/layout/container.t
===================================================================
--- trunk/widgets/org.vexi.widgets/src/org/vexi/lib/layout/container.t  
2010-06-28 14:08:32 UTC (rev 3856)
+++ trunk/widgets/org.vexi.widgets/src/org/vexi/lib/layout/container.t  
2010-07-01 02:33:10 UTC (rev 3857)
@@ -44,9 +44,11 @@
                 // note that edit-specific redirects are in lib.layout.editbox
                 addRedirect(thisbox, v_textbox, "font", "fontsize", "text", 
"textcolor");
             }
-            // initialize properties
             if (thisbox.v_init!=null) {
-                for (var p,v_init_p in v_init) thisbox[p] = v_init_p;
+                // initialize properties
+                for (var p,v_init_p in v_init) {
+                    thisbox[p] = v_init_p;
+                }
             }
         }; // end
         

Modified: trunk/widgets/org.vexi.widgets/src/org/vexi/lib/text/block.t
===================================================================
--- trunk/widgets/org.vexi.widgets/src/org/vexi/lib/text/block.t        
2010-06-28 14:08:32 UTC (rev 3856)
+++ trunk/widgets/org.vexi.widgets/src/org/vexi/lib/text/block.t        
2010-07-01 02:33:10 UTC (rev 3857)
@@ -221,9 +221,13 @@
         var t = trapee;
         var update = t.fontheight == t.minheight;
         t.fontheight = vexi.ui.font.height(t.font, t.fontsize, "dy");
-        if (update) t.minheight = t.fontheight;
+        if (update) {
+            t.minheight = t.fontheight;
+        }
         var n = t.numchildren;
-        for (var i=0; n>i; i++) t[i][trapname] = v;
+        for (var i=0; n>i; i++) {
+            t[i][trapname] = v;
+        }
         static.reflowBlock(t);
     }
     
@@ -281,7 +285,9 @@
         var n = trapee.numchildren;
         for (var i=0; n>i; i++) {
             var w = trapee[i];
-            if (!w.wordcolorset and !w.highlight) w.textcolor = v;
+            if (!w.wordcolorset and !w.highlight) {
+                w.textcolor = v;
+            }
         }
     }
     
@@ -289,7 +295,9 @@
     static.textRead = function() {
         var ret = [];
         var n = trapee.numchildren;
-        for (var i=0; n>i; i++) ret[i] = trapee[i].text;
+        for (var i=0; n>i; i++) {
+            ret[i] = trapee[i].text;
+        }
         return ret.join("");
     }
     
@@ -322,11 +330,13 @@
     static.textWrite = function(v) {
         var t = trapee;
         // delete any existing text
-        while (t[0]) t[0] = null;
+        t.clear();
         
         var l = v.length;
-        // check for empty string
-        if (l == 0) return;
+        if (l == 0) {
+            // check for empty string
+            return;
+        }
         
         // create new text based on v
         var charnext;
@@ -338,7 +348,7 @@
             // change between words
             if (chartype != charnext) {
                 // assign this word
-                t[t.numchildren] = nextword;
+                t.add(nextword);
                 nextword.chartype = chartype;
                 nextword.text = v.substring(startind, i);
                 // move onto next word
@@ -348,7 +358,7 @@
             }
         }
         // assign last word
-        t[t.numchildren] = nextword;
+        t.add(nextword);
         nextword.chartype = chartype;
         nextword.text = v.substring(startind);
         // flow text
@@ -359,8 +369,9 @@
     
     /** reset block dimensions if wrapwidth is unset */
     static.wrapwidthWrite = function(v) {
-        if (v) trapee.width --= static.invokeReflow;
-        else {
+        if (v) {
+            trapee.width --= static.invokeReflow;
+        } else {
             trapee.minwidth = 0;
             trapee.maxwidth = vexi.ui.maxdim;
             trapee.width ++= static.invokeReflow;

Modified: trunk/widgets/org.vexi.widgets/src/org/vexi/lib/text/default.t
===================================================================
--- trunk/widgets/org.vexi.widgets/src/org/vexi/lib/text/default.t      
2010-06-28 14:08:32 UTC (rev 3856)
+++ trunk/widgets/org.vexi.widgets/src/org/vexi/lib/text/default.t      
2010-07-01 02:33:10 UTC (rev 3857)
@@ -62,7 +62,6 @@
                         vexi.ui.font.width(cWord.font, cWord.fontsize, 
cWord.text.substring(0, cPos)));
                     $cursor.y = d.y;
                 }
-            
             } else {
                 // place cursor at start of cBlock
                 var d = $edit.distanceto(cBlock);


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 Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to