summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-11-11 04:37:48 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-11-11 04:37:48 +0000
commitd502f4a525bd2eabb6f6ef2c19128318f6423953 (patch)
treefe444068e11d1fa91bf312e004928d75cf46bb49
parentf9b386d27fd96df1014a7d2559dd8d5a4237c0c1 (diff)
downloadpoezio-d502f4a525bd2eabb6f6ef2c19128318f6423953.tar.gz
poezio-d502f4a525bd2eabb6f6ef2c19128318f6423953.tar.bz2
poezio-d502f4a525bd2eabb6f6ef2c19128318f6423953.tar.xz
poezio-d502f4a525bd2eabb6f6ef2c19128318f6423953.zip
fix the new-subject message and the /part command
-rw-r--r--src/core.py12
-rw-r--r--src/tab.py1
2 files changed, 5 insertions, 8 deletions
diff --git a/src/core.py b/src/core.py
index 8b6b5025..e41df02b 100644
--- a/src/core.py
+++ b/src/core.py
@@ -817,10 +817,7 @@ class Core(object):
subject = message['subject']
if not subject:
return
- if nick_from:
- self.add_message_to_text_buffer(room, _("%(nick)s changed the subject to: %(subject)s") % {'nick':nick_from, 'subject':subject}, time=None)
- else:
- self.add_message_to_text_buffer(room, _("The subject is: %(subject)s") % {'subject':subject}, time=None)
+ self.add_message_to_text_buffer(room, _("%(nick)s set the subject to: %(subject)s") % {'nick':nick_from, 'subject':subject}, time=None)
room.topic = subject.replace('\n', '|')
self.refresh_window()
@@ -1198,11 +1195,11 @@ class Core(object):
"""
/part [msg]
"""
- args = arg.split()
- reason = None
if not isinstance(self.current_tab(), MucTab) and\
not isinstance(self.current_tab(), PrivateTab):
return
+ args = arg.split()
+ reason = None
room = self.current_tab().get_room()
if len(args):
msg = ' '.join(args)
@@ -1211,8 +1208,7 @@ class Core(object):
if isinstance(self.current_tab(), MucTab) and\
self.current_tab().get_room().joined:
muc.leave_groupchat(self.xmpp, room.name, room.own_nick, arg)
- self.tabs.remove(self.current_tab())
- self.refresh_window()
+ self.close_tab()
def close_tab(self, tab=None):
"""
diff --git a/src/tab.py b/src/tab.py
index cf93b2e4..02ba4865 100644
--- a/src/tab.py
+++ b/src/tab.py
@@ -481,6 +481,7 @@ class RosterInfoTab(Tab):
self._color_state = theme.COLOR_TAB_NORMAL
def on_gain_focus(self):
+ log.debug('on_gain_focus\n')
self._color_state = theme.COLOR_TAB_CURRENT
curses.curs_set(0)