summaryrefslogtreecommitdiff
path: root/urwid/graphics.py
diff options
context:
space:
mode:
authorian <none@none>2007-02-19 05:04:40 +0000
committerian <none@none>2007-02-19 05:04:40 +0000
commit4f9378055bbecefed5a39f2c993db0eb91aad7cb (patch)
tree7293c7178037b103fff4da2d603a1b164f362ace /urwid/graphics.py
parentd872a0f2c61519238ed792637fa0f2c37e838306 (diff)
downloadurwid-4f9378055bbecefed5a39f2c993db0eb91aad7cb.tar.gz
fix bugs in WidgetWrap and graph.py
--HG-- extra : convert_revision : e9c7d7b9fae263293da11cb78ac737cae19213d9
Diffstat (limited to 'urwid/graphics.py')
-rwxr-xr-xurwid/graphics.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/urwid/graphics.py b/urwid/graphics.py
index 5c841a7..8e1b251 100755
--- a/urwid/graphics.py
+++ b/urwid/graphics.py
@@ -757,22 +757,23 @@ class ProgressBar( FlowWidget ):
if self.satt is not None:
cs = int((cf - ccol) * 8)
if ccol < 0 or (ccol == 0 and cs == 0):
- c.attr = [[(self.normal,maxcol)]]
+ c._attr = [[(self.normal,maxcol)]]
elif ccol >= maxcol:
- c.attr = [[(self.complete,maxcol)]]
- elif cs and c.text[0][ccol] == " ":
- t = c.text[0]
+ c._attr = [[(self.complete,maxcol)]]
+ elif cs and c._text[0][ccol] == " ":
+ t = c._text[0]
cenc = self.eighths[cs].encode("utf-8")
- c.text[0] = t[:ccol]+cenc+t[ccol+1:]
+ c._text[0] = t[:ccol]+cenc+t[ccol+1:]
a = []
if ccol > 0:
a.append( (self.complete, ccol) )
a.append((self.satt,len(cenc)))
if maxcol-ccol-1 > 0:
a.append( (self.normal, maxcol-ccol-1) )
- c.attr = [a]
+ c._attr = [a]
+ c._cs = [[(None, len(c._text[0]))]]
else:
- c.attr = [[(self.complete,ccol),
+ c._attr = [[(self.complete,ccol),
(self.normal,maxcol-ccol)]]
return c