Update of /cvsroot/freevo/freevo/src/gui/widgets
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6118
Modified Files:
text.py
Log Message:
better new line handling
Index: text.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/gui/widgets/text.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** text.py 20 Nov 2004 18:23:02 -0000 1.10
--- text.py 7 Jan 2005 20:42:55 -0000 1.11
***************
*** 7,10 ****
--- 7,13 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.11 2005/01/07 20:42:55 dischi
+ # better new line handling
+ #
# Revision 1.10 2004/11/20 18:23:02 dischi
# use python logger module for debug
***************
*** 181,184 ****
--- 184,190 ----
# ok, that's it. We don't have any space left
break
+ if c == len(text):
+ # everything fits
+ return text, ''
if word_splitter and text[c] in word_splitter:
# rememeber the last space for mode == 'soft' (not hard)
***************
*** 188,192 ****
if text[c-1] == '\n':
# Oops, line break, stop right here
! break
# now we a have string that is too long, shorten it again
--- 194,198 ----
if text[c-1] == '\n':
# Oops, line break, stop right here
! return text[:c-1], text[c:]
# now we a have string that is too long, shorten it again
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog