This commit is contained in:
louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 2010-06-12 21:28:34 +00:00
parent 52c8cdb5ce
commit 981e12a669
2 changed files with 6 additions and 7 deletions

View file

@ -61,7 +61,7 @@ class Gui(object):
self.muc = muc self.muc = muc
self.commands = { self.commands = {
'help': (self.command_help, _('That.')), 'help': (self.command_help, u'\_o< KOIN KOIN KOIN'),
'join': (self.command_join, _("""Usage: /join [room_name][/nick] 'join': (self.command_join, _("""Usage: /join [room_name][/nick]
[password]\nJoin: Join the specified room. You can specify a nickname after a [password]\nJoin: Join the specified room. You can specify a nickname after a
slash (/). If no nickname is specified, you will use the default_nick in the slash (/). If no nickname is specified, you will use the default_nick in the
@ -322,6 +322,8 @@ Avail: Sets your availability to available and (optional) sets your status
Display the error on the room window Display the error on the room window
""" """
room = self.get_room_by_name(room) room = self.get_room_by_name(room)
if not error:
return
code = error.getAttr('code') code = error.getAttr('code')
typ = error.getAttr('type') typ = error.getAttr('type')
body = error.getTag('text').getData() body = error.getTag('text').getData()

View file

@ -129,11 +129,8 @@ class RoomInfo(Win):
def compare_room(a, b): def compare_room(a, b):
return a.nb - b.nb return a.nb - b.nb
self.win.erase() self.win.erase()
try: self.win.addnstr(0, 0, current.name+" [", self.width
self.win.addnstr(0, 0, current.name+" [", self.width ,curses.color_pair(1))
,curses.color_pair(1))
except:
pass
sorted_rooms = sorted(rooms, compare_room) sorted_rooms = sorted(rooms, compare_room)
for room in sorted_rooms: for room in sorted_rooms:
if current == room: if current == room:
@ -212,7 +209,7 @@ class TextWin(Win):
txt[:limit], message.color, txt[:limit], message.color,
offset) offset)
lines.append(line) lines.append(line)
txt = txt[limit+1:] txt = txt[limit:]
first = False first = False
return lines[-len(messages):]# return only the needed number of lines return lines[-len(messages):]# return only the needed number of lines