Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Speak.activity
diff options
context:
space:
mode:
authorAleksey Lim <alsroot@member.fsf.org>2009-02-06 14:19:58 (GMT)
committer Aleksey Lim <alsroot@member.fsf.org>2009-02-06 14:19:58 (GMT)
commitcc11b24efc43ddffb6ea67d7369f609ff7568fed (patch)
tree5767ab28d3ee871d02473c7be21001fb134e8176 /Speak.activity
parent687eec3da07ef38568a310b402149ef5a8f5ba51 (diff)
Add buddy language to chars' panel
Diffstat (limited to 'Speak.activity')
-rw-r--r--Speak.activity/chat.py20
-rw-r--r--Speak.activity/face.py1
2 files changed, 19 insertions, 2 deletions
diff --git a/Speak.activity/chat.py b/Speak.activity/chat.py
index a27d493..9e707a4 100644
--- a/Speak.activity/chat.py
+++ b/Speak.activity/chat.py
@@ -124,12 +124,16 @@ class Chat(hippo.Canvas):
i = self._buddies.get(buddy)
if i:
face = i['face']
+ lang_box = None
else:
self._add_buddy(buddy)
face = self._buddies[buddy]['face']
+ lang_box = self._buddies[buddy]['lang']
if status:
face.update(status)
+ if lang_box:
+ lang_box.props.text = status.voice.friendlyname
if text:
self._chat.add_text(buddy, text)
if self.props.window and self.props.window.is_visible():
@@ -161,18 +165,30 @@ class Chat(hippo.Canvas):
buddy_face, buddy_widget = self._new_face(buddy, BUDDIES_COLOR)
+ char_box = hippo.CanvasBox(
+ orientation = hippo.ORIENTATION_VERTICAL,
+ )
nick = hippo.CanvasText(
text = buddy.props.nick,
xalign = hippo.ALIGNMENT_START,
yalign = hippo.ALIGNMENT_START
)
+ lang = hippo.CanvasText(
+ text = '',
+ xalign = hippo.ALIGNMENT_START,
+ yalign = hippo.ALIGNMENT_START
+ )
+ char_box.append(nick)
+ char_box.append(lang)
box.append(buddy_widget)
- box.append(nick, hippo.PACK_EXPAND)
+ box.append(char_box, hippo.PACK_EXPAND)
self._buddies[buddy] = {
'box' : box,
- 'face' : buddy_face }
+ 'face' : buddy_face,
+ 'lang' : lang
+ }
self._buddies_list.append(box)
if len(self._buddies) == 1:
diff --git a/Speak.activity/face.py b/Speak.activity/face.py
index 3f239b9..0763142 100644
--- a/Speak.activity/face.py
+++ b/Speak.activity/face.py
@@ -139,6 +139,7 @@ class View(gtk.EventBox):
if not self._mapped:
self._peding = status
return
+ self.status = status
if self._eyes:
for eye in self._eyes: