summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorian <none@none>2006-02-13 21:38:08 +0000
committerian <none@none>2006-02-13 21:38:08 +0000
commitb1f79a6bb89cac001c44d82d25263bf523f1eb56 (patch)
tree8e767d6112e01a53578b7836437f538d8037ac9e
parentf79ce0cdad0a80e0861b5fdb9663881a5e972721 (diff)
downloadurwid-b1f79a6bb89cac001c44d82d25263bf523f1eb56.tar.gz
release 0.9.0-pre3release-0.9.0-pre3
--HG-- extra : convert_revision : 7c7fac871d5b4e983d729ae935e56a577e19ebc6
-rw-r--r--setup.py2
-rw-r--r--tutorial.html118
-rw-r--r--urwid/canvas.py4
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.
-<div class="shot"><pre><span style="color:black;background:teal">Press F1 to exit.</span><span style="color:black;background:teal"> </span>
+<div class="shot"><pre><span style="color:black;background:teal">Press F1 to exit. </span>
<span style="color:#0000c0;background:silver">What is your name?</span><span style="color:black;background:silver"> </span>
<span style="color:black;background:silver"><u> </u> </span>
<span style="color:black;background:silver"> </span>
@@ -499,7 +499,7 @@ but the ListBox will still be displaying the old list.
<span style="color:black;background:silver"> </span>
<span style="color:black;background:silver"> </span>
</pre></div>
-<div class="shot"><pre><span style="color:black;background:teal">Press F1 to exit.</span><span style="color:black;background:teal"> </span>
+<div class="shot"><pre><span style="color:black;background:teal">Press F1 to exit. </span>
<span style="color:#0000c0;background:silver">What is your name?</span><span style="color:black;background:silver"> </span>
<span style="color:black;background:silver">Tim t<u> </u> </span>
<span style="color:#0000c0;background:silver">Nice to meet you, Tim</span>
@@ -507,7 +507,7 @@ but the ListBox will still be displaying the old list.
<span style="color:black;background:silver"> </span>
<span style="color:black;background:silver"> </span>
</pre></div>
-<div class="shot"><pre><span style="color:black;background:teal">Press F1 to exit.</span><span style="color:black;background:teal"> </span>
+<div class="shot"><pre><span style="color:black;background:teal">Press F1 to exit. </span>
<span style="color:#0000c0;background:silver">What is your name?</span><span style="color:black;background:silver"> </span>
<span style="color:black;background:silver">Tim the Ench<u> </u> </span>
<span style="color:#0000c0;background:silver">Nice to meet you, Tim</span>
@@ -515,7 +515,7 @@ but the ListBox will still be displaying the old list.
<span style="color:black;background:silver"> </span>
<span style="color:black;background:silver"> </span>
</pre></div>
-<div class="shot"><pre><span style="color:black;background:teal">Press F1 to exit.</span><span style="color:black;background:teal"> </span>
+<div class="shot"><pre><span style="color:black;background:teal">Press F1 to exit. </span>
<span style="color:#0000c0;background:silver">What is your name?</span><span style="color:black;background:silver"> </span>
<span style="color:black;background:silver">Tim the Enchanter<u> </u> </span>
<span style="color:#0000c0;background:silver">Nice to meet you, Tim</span>
@@ -602,7 +602,7 @@ does most of the hard work:
</ul>
</ul>
-<div class="shot"><pre><span style="color:black;background:teal">Press F1 to exit.</span><span style="color:black;background:teal"> </span>
+<div class="shot"><pre><span style="color:black;background:teal">Press F1 to exit. </span>
<span style="color:#0000c0;background:silver">What is your name?</span><span style="color:black;background:silver"> </span>
<span style="color:black;background:silver">Abe </span>
<span style="color:#0000c0;background:silver">Nice to meet you, Abe</span><span style="color:black;background:silver"> </span>
@@ -616,7 +616,7 @@ does most of the hard work:
<span style="color:black;background:silver"> </span>
<span style="color:black;background:silver"> </span>
</pre></div>
-<div class="shot"><pre><span style="color:black;background:teal">Press F1 to exit.</span><span style="color:black;background:teal"> </span>
+<div class="shot"><pre><span style="color:black;background:teal">Press F1 to exit. </span>
<span style="color:#0000c0;background:silver">Nice to meet you, Abe</span><span style="color:black;background:silver"> </span>
<span style="color:black;background:silver"> </span>
<span style="color:#0000c0;background:silver">What is your name?</span><span style="color:black;background:silver"> </span>
@@ -630,7 +630,7 @@ does most of the hard work:
<span style="color:#0000c0;background:silver">What is your name?</span><span style="color:black;background:silver"> </span>
<span style="color:black;background:silver"><u> </u> </span>
</pre></div>
-<div class="shot"><pre><span style="color:black;background:teal">Press F1 to exit.</span><span style="color:black;background:teal"> </span>
+<div class="shot"><pre><span style="color:black;background:teal">Press F1 to exit. </span>
<span style="color:#0000c0;background:silver">Nice to meet you, Bob</span><span style="color:black;background:silver"> </span>
<span style="color:black;background:silver"> </span>
<span style="color:#0000c0;background:silver">What is your name?</span><span style="color:black;background:silver"> </span>
@@ -687,52 +687,52 @@ CONTENT = [ urwid.AttrWrap( w, None, 'reveal focus' ) for w in [
urwid.Text(&quot;The end.&quot;),
] ]
</pre>
-<div class="shot"><pre><span style="color:white;background:black">Pressed:</span><span style="color:white;background:black"> </span>
-<span style="color:black;background:teal">This is a text</span><span style="color:black;background:teal"> </span>
-<span style="color:black;background:teal">string that is</span><span style="color:black;background:teal"> </span>
-<span style="color:black;background:teal">fairly long</span><span style="color:black;background:teal"> </span>
+<div class="shot"><pre><span style="color:white;background:black">Pressed: </span>
+<span style="color:black;background:teal">This is a text </span>
+<span style="color:black;background:teal">string that is </span>
+<span style="color:black;background:teal">fairly long </span>
<span style="color:black;background:silver">---------------</span>
-<span style="color:black;background:silver">Short one</span><span style="color:black;background:silver"> </span>
-<span style="color:black;background:silver">Another</span><span style="color:black;background:silver"> </span>
+<span style="color:black;background:silver">Short one </span>
+<span style="color:black;background:silver">Another </span>
</pre></div>
-<div class="shot"><pre><span style="color:white;background:black">Pressed: down</span><span style="color:white;background:black"> </span>
-<span style="color:black;background:silver">string that is</span><span style="color:black;background:silver"> </span>
-<span style="color:black;background:silver">fairly long</span><span style="color:black;background:silver"> </span>
+<div class="shot"><pre><span style="color:white;background:black">Pressed: down </span>
+<span style="color:black;background:silver">string that is </span>
+<span style="color:black;background:silver">fairly long </span>
<span style="color:black;background:silver">---------------</span>
-<span style="color:black;background:silver">Short one</span><span style="color:black;background:silver"> </span>
-<span style="color:black;background:silver">Another</span><span style="color:black;background:silver"> </span>
+<span style="color:black;background:silver">Short one </span>
+<span style="color:black;background:silver">Another </span>
<span style="color:black;background:teal">---------------</span>
</pre></div>
-<div class="shot"><pre><span style="color:white;background:black">Pressed: down</span><span style="color:white;background:black"> </span>
-<span style="color:black;background:silver">fairly long</span><span style="color:black;background:silver"> </span>
+<div class="shot"><pre><span style="color:white;background:black">Pressed: down </span>
+<span style="color:black;background:silver">fairly long </span>
<span style="color:black;background:silver">---------------</span>
-<span style="color:black;background:silver">Short one</span><span style="color:black;background:silver"> </span>
-<span style="color:black;background:silver">Another</span><span style="color:black;background:silver"> </span>
+<span style="color:black;background:silver">Short one </span>
+<span style="color:black;background:silver">Another </span>
<span style="color:black;background:silver">---------------</span>
-<span style="color:black;background:teal">What could be</span><span style="color:black;background:teal"> </span>
+<span style="color:black;background:teal">What could be </span>
</pre></div>
-<div class="shot"><pre><span style="color:white;background:black">Pressed: down</span><span style="color:white;background:black"> </span>
+<div class="shot"><pre><span style="color:white;background:black">Pressed: down </span>
<span style="color:black;background:silver">---------------</span>
-<span style="color:black;background:silver">Short one</span><span style="color:black;background:silver"> </span>
-<span style="color:black;background:silver">Another</span><span style="color:black;background:silver"> </span>
+<span style="color:black;background:silver">Short one </span>
+<span style="color:black;background:silver">Another </span>
<span style="color:black;background:silver">---------------</span>
-<span style="color:black;background:teal">What could be</span><span style="color:black;background:teal"> </span>
-<span style="color:black;background:teal">after this?</span><span style="color:black;background:teal"> </span>
+<span style="color:black;background:teal">What could be </span>
+<span style="color:black;background:teal">after this? </span>
</pre></div>
-<div class="shot"><pre><span style="color:white;background:black">Pressed: up</span><span style="color:white;background:black"> </span>
-<span style="color:black;background:teal">fairly long</span><span style="color:black;background:teal"> </span>
+<div class="shot"><pre><span style="color:white;background:black">Pressed: up </span>
+<span style="color:black;background:teal">fairly long </span>
<span style="color:black;background:silver">---------------</span>
-<span style="color:black;background:silver">Short one</span><span style="color:black;background:silver"> </span>
-<span style="color:black;background:silver">Another</span><span style="color:black;background:silver"> </span>
+<span style="color:black;background:silver">Short one </span>
+<span style="color:black;background:silver">Another </span>
<span style="color:black;background:silver">---------------</span>
-<span style="color:black;background:silver">What could be</span><span style="color:black;background:silver"> </span>
+<span style="color:black;background:silver">What could be </span>
</pre></div>
-<div class="shot"><pre><span style="color:white;background:black">Pressed: up</span><span style="color:white;background:black"> </span>
-<span style="color:black;background:teal">string that is</span><span style="color:black;background:teal"> </span>
-<span style="color:black;background:teal">fairly long</span><span style="color:black;background:teal"> </span>
+<div class="shot"><pre><span style="color:white;background:black">Pressed: up </span>
+<span style="color:black;background:teal">string that is </span>
+<span style="color:black;background:teal">fairly long </span>
<span style="color:black;background:silver">---------------</span>
-<span style="color:black;background:silver">Short one</span><span style="color:black;background:silver"> </span>
-<span style="color:black;background:silver">Another</span><span style="color:black;background:silver"> </span>
+<span style="color:black;background:silver">Short one </span>
+<span style="color:black;background:silver">Another </span>
<span style="color:black;background:silver">---------------</span>
</pre></div>
<br clear="left">
@@ -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.
<br><br>
-<div class="shot"><pre><span style="color:white;background:black">Pressed:</span><span style="color:white;background:black"> </span>
-<span style="color:black;background:teal">string that is</span><span style="color:black;background:teal"> </span>
-<span style="color:black;background:teal">fairly long</span><span style="color:black;background:teal"> </span>
+<div class="shot"><pre><span style="color:white;background:black">Pressed: </span>
+<span style="color:black;background:teal">string that is </span>
+<span style="color:black;background:teal">fairly long </span>
<span style="color:black;background:silver">--------------------</span>
-<span style="color:black;background:silver">Short one</span><span style="color:black;background:silver"> </span>
-<span style="color:black;background:silver">Another</span><span style="color:black;background:silver"> </span>
+<span style="color:black;background:silver">Short one </span>
+<span style="color:black;background:silver">Another </span>
<span style="color:black;background:silver">--------------------</span>
-<span style="color:black;background:silver">What could be after</span><span style="color:black;background:silver"> </span>
-<span style="color:black;background:silver">this?</span><span style="color:black;background:silver"> </span>
+<span style="color:black;background:silver">What could be after </span>
+<span style="color:black;background:silver">this? </span>
</pre></div>
-<div class="shot"><pre><span style="color:white;background:black">Pressed:</span><span style="color:white;background:black"> </span>
-<span style="color:black;background:teal">This is a text string</span><span style="color:black;background:teal"> </span>
-<span style="color:black;background:teal">that is fairly long</span><span style="color:black;background:teal"> </span>
+<div class="shot"><pre><span style="color:white;background:black">Pressed: </span>
+<span style="color:black;background:teal">This is a text string </span>
+<span style="color:black;background:teal">that is fairly long </span>
<span style="color:black;background:silver">-------------------------</span>
-<span style="color:black;background:silver">Short one</span><span style="color:black;background:silver"> </span>
-<span style="color:black;background:silver">Another</span><span style="color:black;background:silver"> </span>
+<span style="color:black;background:silver">Short one </span>
+<span style="color:black;background:silver">Another </span>
<span style="color:black;background:silver">-------------------------</span>
</pre></div>
-<div class="shot"><pre><span style="color:white;background:black">Pressed:</span><span style="color:white;background:black"> </span>
-<span style="color:black;background:teal">This is a</span><span style="color:black;background:teal"> </span>
+<div class="shot"><pre><span style="color:white;background:black">Pressed: </span>
+<span style="color:black;background:teal">This is a </span>
<span style="color:black;background:teal">text string</span>
-<span style="color:black;background:teal">that is</span><span style="color:black;background:teal"> </span>
+<span style="color:black;background:teal">that is </span>
<span style="color:black;background:teal">fairly long</span>
<span style="color:black;background:silver">-----------</span>
-<span style="color:black;background:silver">Short one</span><span style="color:black;background:silver"> </span>
-<span style="color:black;background:silver">Another</span><span style="color:black;background:silver"> </span>
+<span style="color:black;background:silver">Short one </span>
+<span style="color:black;background:silver">Another </span>
<span style="color:black;background:silver">-----------</span>
-<span style="color:black;background:silver">What could</span><span style="color:black;background:silver"> </span>
-<span style="color:black;background:silver">be after</span><span style="color:black;background:silver"> </span>
-<span style="color:black;background:silver">this?</span><span style="color:black;background:silver"> </span>
-<span style="color:black;background:silver">The end.</span><span style="color:black;background:silver"> </span>
+<span style="color:black;background:silver">What could </span>
+<span style="color:black;background:silver">be after </span>
+<span style="color:black;background:silver">this? </span>
+<span style="color:black;background:silver">The end. </span>
</pre></div>
<br clear="left">
<br><br>
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