Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Ortiz <rafael@activitycentral.com>2011-06-13 21:09:22 (GMT)
committer Aleksey Lim <alsroot@activitycentral.org>2011-07-03 00:10:24 (GMT)
commit74ca297f8db4c4dc851a830576a1557559475701 (patch)
tree86253c4f680090db1da1d109a283663797616f00
parent59e4d4a061f1cac23ef9928ae01deb3b12d6c3be (diff)
pep8 fixes
Pep8 fixes for box
-rw-r--r--chat/box.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/chat/box.py b/chat/box.py
index d201b20..a05015c 100644
--- a/chat/box.py
+++ b/chat/box.py
@@ -64,6 +64,7 @@ class ChatBox(hippo.CanvasScrollbars):
self._conversation = hippo.CanvasBox(
spacing=0,
+ box_width=-1, # natural width
background_color=style.COLOR_WHITE.get_int())
self.set_policy(hippo.ORIENTATION_HORIZONTAL,
@@ -101,6 +102,7 @@ class ChatBox(hippo.CanvasScrollbars):
| | +------------+ | |
| +----------------+ |
`--------------------------------'
+ ###Warning hippocanvas dependency###
"""
if not buddy:
buddy = self.owner
@@ -149,18 +151,22 @@ class ChatBox(hippo.CanvasScrollbars):
rb = self._last_msg
msg_vbox = rb.get_children()[1]
msg_hbox = hippo.CanvasBox(
+ box_width=-1, # natural width
orientation=hippo.ORIENTATION_HORIZONTAL)
msg_vbox.append(msg_hbox)
else:
rb = CanvasRoundBox(background_color=color_fill,
border_color=color_stroke,
+ box_width=-1, # natural width
padding=4)
rb.props.border_color = color_stroke # Bug #3742
self._last_msg = rb
self._last_msg_sender = buddy
+
if not status_message:
name = hippo.CanvasText(text=nick + ': ', color=text_color)
name_vbox = hippo.CanvasBox(
+ box_width=-1,
orientation=hippo.ORIENTATION_VERTICAL)
name_vbox.append(name)
rb.append(name_vbox)
@@ -238,7 +244,7 @@ class ChatBox(hippo.CanvasScrollbars):
timestamp_seconds = time.mktime(time_with_current_year)
if timestamp_seconds > time.time():
- time_with_previous_year = (time.localtime(time.time())[0]-1,) +\
+ time_with_previous_year = (time.localtime(time.time())[0] - 1,) +\
time.strptime(timestamp, "%b %d %H:%M:%S")[1:]
timestamp_seconds = time.mktime(time_with_previous_year)