[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue-common/src/utils TextUtils.py
From: |
Jason Cater |
Subject: |
gnue-common/src/utils TextUtils.py |
Date: |
Sun, 10 Aug 2003 13:59:04 -0400 |
CVSROOT: /cvsroot/gnue
Module name: gnue-common
Branch:
Changes by: Jason Cater <address@hidden> 03/08/10 13:59:04
Modified files:
src/utils : TextUtils.py
Log message:
typo
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/utils/TextUtils.py.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
Patches:
Index: gnue-common/src/utils/TextUtils.py
diff -c gnue-common/src/utils/TextUtils.py:1.9
gnue-common/src/utils/TextUtils.py:1.10
*** gnue-common/src/utils/TextUtils.py:1.9 Sat Aug 9 23:12:55 2003
--- gnue-common/src/utils/TextUtils.py Sun Aug 10 13:59:04 2003
***************
*** 34,40 ****
ALIGN_CENTER=2
# very simple lineWrap
! def lineWrap(message,maxWidth, preserveNewlines=1, alignment=ALIGN_LEFT):
text = ""
--- 34,40 ----
ALIGN_CENTER=2
# very simple lineWrap
! def lineWrap(message,maxWidth, preserveNewlines=1, alignment=ALIGN_LEFT,
eol=1):
text = ""
***************
*** 63,76 ****
text += "%s\n" % line
strings = strings[index:]
! line = strings[:index]
if alignment == ALIGN_CENTER:
line = ' ' * ( (maxWidth - len(line)) /2 ) + line
elif alignment == ALIGN_RIGHT:
line = ' ' * ( (maxWidth - len(line)) ) + line
text += "%s\n" % line
! return text
def textToMeasurement(text, multiplier=1):
--- 63,79 ----
text += "%s\n" % line
strings = strings[index:]
! line = strings
if alignment == ALIGN_CENTER:
line = ' ' * ( (maxWidth - len(line)) /2 ) + line
elif alignment == ALIGN_RIGHT:
line = ' ' * ( (maxWidth - len(line)) ) + line
text += "%s\n" % line
! if not eol:
! return text[:-1]
! else:
! return text
def textToMeasurement(text, multiplier=1):