diff orpg/tools/predTextCtrl.py @ 122:36919b8a3ef9 alpha

Traipse Alpha 'OpenRPG' {091031-00} Traipse is a distribution of OpenRPG that is designed to be easy to setup and go. Traipse also makes it easy for developers to work on code without fear of sacrifice. 'Ornery-Orc' continues the trend of 'Grumpy' and adds fixes to the code. 'Ornery-Orc's main goal is to offer more advanced features and enhance the productivity of the user. Update Summary (Cleaning up for Beta) Added Bookmarks Fix to Remote Admin Commands Minor fix to text based Server Fix to Pretty Print, from Core Fix to Splitter Nodes not being created Fix to massive amounts of images loading, from Core Added 'boot' command to remote admin Added confirmation window for sent nodes Minor changes to allow for portability to an OpenSUSE linux OS Miniatures Layer pop up box allows users to turn off Mini labels, from FlexiRPG Zoom Mouse plugin added Images added to Plugin UI Switching to Element Tree Map efficiency, from FlexiRPG Added Status Bar to Update Manager default_manifest.xml renamed to default_upmana.xml Cleaner clode for saved repositories New TrueDebug Class in orpg_log Mercurial's hgweb folder is ported to upmana Happy Halloween!
author sirebral
date Sat, 31 Oct 2009 22:07:55 -0500
parents 9314d63c0941
children 0f720618a8bd
line wrap: on
line diff
--- a/orpg/tools/predTextCtrl.py	Fri Oct 30 22:21:40 2009 -0500
+++ b/orpg/tools/predTextCtrl.py	Sat Oct 31 22:07:55 2009 -0500
@@ -353,30 +353,30 @@
         ExpandoTextCtrl._wrapLine = self._wrapLine
         
 
-        def _wrapLine(self, line, dc, width):
-            # Estimate where the control will wrap the lines and
-            # return the count of extra lines needed.
-            # Re writes ExpandoTextCtrl _wrapLine function
-            print 'New _wrapLine Function'
-            pte = dc.GetPartialTextExtents(line)
-            width -= wx.SystemSettings.GetMetric(wx.SYS_VSCROLL_X)
-            idx = 0
-            start = 0
-            count = 0
-            spc = -1
-            while idx < len(pte):
-                if line[idx] == ' ': spc = idx
-                if pte[idx] - start > width:
-                    # we've reached the max width, add a new line
-                    count += 1
-                # did we see a space? if so restart the count at that pos
-                if spc != -1:
-                    idx = spc + 1
-                    spc = -1
-                start = pte[idx]
-            else:
-                idx += 1
-            return count
+    def _wrapLine(self, line, dc, width):
+        # Estimate where the control will wrap the lines and
+        # return the count of extra lines needed.
+        # Re writes ExpandoTextCtrl _wrapLine function
+        print 'New _wrapLine Function'
+        pte = dc.GetPartialTextExtents(line)
+        width -= wx.SystemSettings.GetMetric(wx.SYS_VSCROLL_X)
+        idx = 0
+        start = 0
+        count = 0
+        spc = -1
+        while idx < len(pte):
+            if line[idx] == ' ': spc = idx
+            if pte[idx] - start > width:
+                # we've reached the max width, add a new line
+                count += 1
+            # did we see a space? if so restart the count at that pos
+            if spc != -1:
+                idx = spc + 1
+                spc = -1
+            start = pte[idx]
+        else:
+            idx += 1
+        return count
 
     # findWord subroutine.
     #