summaryrefslogtreecommitdiff
path: root/src/gui.py
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-01-31 15:59:37 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-01-31 15:59:37 +0000
commit18f161e4a687353f1c888d25fb1b8c3de8ee284d (patch)
tree3c58d72d3b43dd1595bf5115e9709bc10dc01abb /src/gui.py
parent4a583ee2ae12316989bc0350d7d3e19c4f82577b (diff)
downloadpoezio-18f161e4a687353f1c888d25fb1b8c3de8ee284d.tar.gz
poezio-18f161e4a687353f1c888d25fb1b8c3de8ee284d.tar.bz2
poezio-18f161e4a687353f1c888d25fb1b8c3de8ee284d.tar.xz
poezio-18f161e4a687353f1c888d25fb1b8c3de8ee284d.zip
corrige un bug dans la liste de contacts (saloperie d'utf-8)
Diffstat (limited to 'src/gui.py')
-rw-r--r--src/gui.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gui.py b/src/gui.py
index 6b557575..2b2845df 100644
--- a/src/gui.py
+++ b/src/gui.py
@@ -84,7 +84,7 @@ class Room(object):
return info.encode('utf-8')
except: # I JUST FUCKING HATE THIS .encode.decode.shit !!!
self.lines.append((datetime.now(), info))
- return info
+ return info.encode('utf-8')
def get_user_by_name(self, nick):
for user in self.users:
@@ -104,7 +104,7 @@ class Room(object):
if nick.encode('utf-8') == self.own_nick:
self.joined = True
return self.add_info(_("Your nickname is %s") % (nick))
- return self.add_info(_("%s is in the room") % (nick))
+ return self.add_info(_("%s is in the room") % (nick.encode-('utf-8')))
change_nick = stanza.getStatusCode() == '303'
kick = stanza.getStatusCode() == '307'
user = self.get_user_by_name(nick)
@@ -322,7 +322,10 @@ class Gui(object):
else:
msg = room.on_presence(stanza, from_nick)
if room == self.current_room():
- self.window.text_win.add_line(room, (datetime.now(), msg))
+ try:
+ self.window.text_win.add_line(room, (datetime.now(), msg))
+ except:
+ pass
self.window.text_win.refresh(room.name)
self.window.user_win.refresh(room.users)
self.window.text_win.refresh()
@@ -362,7 +365,6 @@ class Gui(object):
msg = self.commands[args[0]][1]
else:
msg = _('Unknown command: %s') % args[0]
-# open('fion', 'w').write(msg)
room.add_info(msg)
self.window.text_win.add_line(room, (datetime.now(), msg))
self.window.text_win.refresh(room.name)