Update of /cvsroot/freevo/freevo/src/gui/widgets
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21313

Modified Files:
        textbox.py 
Log Message:
fix \n handling

Index: textbox.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/gui/widgets/textbox.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** textbox.py  20 Nov 2004 18:23:02 -0000      1.6
--- textbox.py  18 Dec 2004 18:12:24 -0000      1.7
***************
*** 7,10 ****
--- 7,13 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.7  2004/12/18 18:12:24  dischi
+ # fix \n handling
+ #
  # Revision 1.6  2004/11/20 18:23:02  dischi
  # use python logger module for debug
***************
*** 83,88 ****
          max_width = 0
          
-         # split the text into lines
-         # FIXME: respect for '\n' is missing
          formated_text    = []
          current_ellipses = ''
--- 86,89 ----
***************
*** 94,98 ****
  
              w = font.stringsize(text)
!             if font.stringsize(text) <= width:
                  formated_text.append((text, w))
                  max_width = max(max_width, w)
--- 95,99 ----
  
              w = font.stringsize(text)
!             if font.stringsize(text) <= width and text.find('\n') == -1:
                  formated_text.append((text, w))
                  max_width = max(max_width, w)
***************
*** 117,120 ****
--- 118,122 ----
                  formated_text.append((fit, w))
                  max_width = max(max_width, w)
+                 rest = rest.lstrip(' \t')
                  if rest and rest[0] == '\n':
                      rest = rest[1:]



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to