summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-02-13 01:08:44 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-02-13 01:08:44 +0000
commit808c0854e810159c1c89e4599cfad38893c06646 (patch)
tree3cfc95dffc2c260b9ea2a9fad1e1d0001416fc94 /src
parente13db0a9bc5ea2c2f52f029643a98e993258c998 (diff)
downloadpoezio-808c0854e810159c1c89e4599cfad38893c06646.tar.gz
poezio-808c0854e810159c1c89e4599cfad38893c06646.tar.bz2
poezio-808c0854e810159c1c89e4599cfad38893c06646.tar.xz
poezio-808c0854e810159c1c89e4599cfad38893c06646.zip
fixed #1163
Diffstat (limited to 'src')
-rw-r--r--src/client.py4
-rw-r--r--src/gui.py18
2 files changed, 15 insertions, 7 deletions
diff --git a/src/client.py b/src/client.py
index 9840d259..d3561a86 100644
--- a/src/client.py
+++ b/src/client.py
@@ -20,8 +20,8 @@
import sys
# disable any printout (this would mess the display)
stderr = sys.stderr
-sys.stdout = open('/dev/null', 'w')
-sys.stderr = open('/dev/null', 'w')
+# sys.stdout = open('/dev/null', 'w')
+# sys.stderr = open('/dev/null', 'w')
from connection import Connection
from multiuserchat import MultiUserChat
diff --git a/src/gui.py b/src/gui.py
index eb5985c3..e2323c0a 100644
--- a/src/gui.py
+++ b/src/gui.py
@@ -130,7 +130,9 @@ class Room(object):
# New user
if not user:
self.users.append(User(nick, affiliation, show, status, role))
- return self.add_info(_('%(nick)s joined the room %(roomname)s') % {'nick':nick, 'roomname': self.name})
+ if not config.get('hide_enter_join', "false") == "true":
+ return self.add_info(_('%(nick)s joined the room %(roomname)s') % {'nick':nick, 'roomname': self.name})
+ return None
# nick change
if change_nick:
if user.nick == self.own_nick:
@@ -159,10 +161,14 @@ class Room(object):
# user quit
if status == 'offline' or role == 'none':
self.users.remove(user)
- return self.add_info(_('%s has left the room') % (nick))
+ if not config.get('hide_enter_join', "false") == "true":
+ return self.add_info(_('%s has left the room') % (nick))
+ return None
# status change
user.update(affiliation, show, status, role)
- return self.add_info(_('%(nick)s changed his/her status : %(a)s, %(b)s, %(c)s, %(d)s') % {'nick':nick, 'a':affiliation, 'b':role, 'c':show, 'd':status})
+ if not config.get('hide_status_change', "false") == "true":
+ return self.add_info(_('%(nick)s changed his/her status : %(a)s, %(b)s, %(c)s, %(d)s') % {'nick':nick, 'a':affiliation, 'b':role, 'c':show, 'd':status})
+ return None
class Gui(object):
@@ -378,12 +384,14 @@ class Gui(object):
msg = _("Error: %s") % stanza.getError()
else:
msg = room.on_presence(stanza, from_nick)
- if room == self.current_room():
+ if room == self.current_room():
+ self.window.user_win.refresh(room.users)
+ if room == self.current_room() and msg:
self.window.text_win.add_line(room, (datetime.now(), msg))
self.window.text_win.refresh(room.name)
self.window.user_win.refresh(room.users)
self.window.text_win.refresh()
- curses.doupdate()
+ curses.doupdate()
def room_iq(self, iq):
if len(sys.argv) > 1: