From b1f79a6bb89cac001c44d82d25263bf523f1eb56 Mon Sep 17 00:00:00 2001 From: ian Date: Mon, 13 Feb 2006 21:38:08 +0000 Subject: release 0.9.0-pre3 --HG-- extra : convert_revision : 7c7fac871d5b4e983d729ae935e56a577e19ebc6 --- setup.py | 2 +- tutorial.html | 118 ++++++++++++++++++++++++++++---------------------------- urwid/canvas.py | 4 +- 3 files changed, 62 insertions(+), 62 deletions(-) diff --git a/setup.py b/setup.py index da8fd5c..09076c7 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ from distutils.core import setup import os -release = "0.9.0-pre2" +release = "0.9.0-pre3" setup_d = { 'name':"urwid", diff --git a/tutorial.html b/tutorial.html index 71ea274..72aee28 100644 --- a/tutorial.html +++ b/tutorial.html @@ -491,7 +491,7 @@ editing operations on the list, eg. "list = list + [something]" will not work, use "list += [something]" instead. The former code will create a new list but the ListBox will still be displaying the old list. -
Press F1 to exit.    
+
Press F1 to exit.    
 What is your name?   
                      
                      
@@ -499,7 +499,7 @@ but the ListBox will still be displaying the old list.
                      
                      
 
-
Press F1 to exit.    
+
Press F1 to exit.    
 What is your name?   
 Tim t                
 Nice to meet you, Tim
@@ -507,7 +507,7 @@ but the ListBox will still be displaying the old list.
                      
                      
 
-
Press F1 to exit.    
+
Press F1 to exit.    
 What is your name?   
 Tim the Ench         
 Nice to meet you, Tim
@@ -515,7 +515,7 @@ but the ListBox will still be displaying the old list.
                      
                      
 
-
Press F1 to exit.    
+
Press F1 to exit.    
 What is your name?   
 Tim the Enchanter    
 Nice to meet you, Tim
@@ -602,7 +602,7 @@ does most of the hard work:
   
 
 
-
Press F1 to exit.      
+
Press F1 to exit.      
 What is your name?     
 Abe                    
 Nice to meet you, Abe  
@@ -616,7 +616,7 @@ does most of the hard work:
                        
                        
 
-
Press F1 to exit.      
+
Press F1 to exit.      
 Nice to meet you, Abe  
                        
 What is your name?     
@@ -630,7 +630,7 @@ does most of the hard work:
 What is your name?     
                        
 
-
Press F1 to exit.      
+
Press F1 to exit.      
 Nice to meet you, Bob  
                        
 What is your name?     
@@ -687,52 +687,52 @@ CONTENT = [ urwid.AttrWrap( w, None, 'reveal focus' ) for w in [
 	urwid.Text("The end."),
 ] ]
 
-
Pressed:       
-This is a text 
-string that is 
-fairly long    
+
Pressed:       
+This is a text 
+string that is 
+fairly long    
 ---------------
-Short one      
-Another        
+Short one      
+Another        
 
-
Pressed: down  
-string that is 
-fairly long    
+
Pressed: down  
+string that is 
+fairly long    
 ---------------
-Short one      
-Another        
+Short one      
+Another        
 ---------------
 
-
Pressed: down  
-fairly long    
+
Pressed: down  
+fairly long    
 ---------------
-Short one      
-Another        
+Short one      
+Another        
 ---------------
-What could be  
+What could be  
 
-
Pressed: down  
+
Pressed: down  
 ---------------
-Short one      
-Another        
+Short one      
+Another        
 ---------------
-What could be  
-after this?    
+What could be  
+after this?    
 
-
Pressed: up    
-fairly long    
+
Pressed: up    
+fairly long    
 ---------------
-Short one      
-Another        
+Short one      
+Another        
 ---------------
-What could be  
+What could be  
 
-
Pressed: up    
-string that is 
-fairly long    
+
Pressed: up    
+string that is 
+fairly long    
 ---------------
-Short one      
-Another        
+Short one      
+Another        
 ---------------
 

@@ -747,37 +747,37 @@ The ListBox uses this method of remembering the focus widget location so that when the ListBox is resized the text displayed will stay roughly aligned with the top of the ListBox.

-
Pressed:            
-string that is      
-fairly long         
+
Pressed:            
+string that is      
+fairly long         
 --------------------
-Short one           
-Another             
+Short one           
+Another             
 --------------------
-What could be after 
-this?               
+What could be after 
+this?               
 
-
Pressed:                 
-This is a text string    
-that is fairly long      
+
Pressed:                 
+This is a text string    
+that is fairly long      
 -------------------------
-Short one                
-Another                  
+Short one                
+Another                  
 -------------------------
 
-
Pressed:   
-This is a  
+
Pressed:   
+This is a  
 text string
-that is    
+that is    
 fairly long
 -----------
-Short one  
-Another    
+Short one  
+Another    
 -----------
-What could 
-be after   
-this?      
-The end.   
+What could 
+be after   
+this?      
+The end.   
 



diff --git a/urwid/canvas.py b/urwid/canvas.py index 55cc38e..3e7de91 100644 --- a/urwid/canvas.py +++ b/urwid/canvas.py @@ -63,14 +63,14 @@ class Canvas: w = widths[i] if w > maxcol: raise CanvasError("Canvas text is wider than the maxcol specified \n%s\n%s\n%s"%(`maxcol`,`widths`,`text`)) + if w < maxcol: + text[i] = text[i] + " "*(maxcol-w) a_gap = len(text[i]) - attr_run( attr[i] ) if a_gap < 0: raise CanvasError("Attribute extends beyond text \n%s\n%s" % (`text[i]`,`attr[i]`) ) if a_gap: attr_append( attr[i], None, a_gap) - if w < maxcol: - text[i] = text[i] + " "*(maxcol-w) self.attr = attr self.cursor = cursor -- cgit v1.2.1