Small change to buffer close
Don't leave chat mode if the buffer to close isn't the current one.
--- a/mcabber/src/screen.c Thu Nov 08 23:46:18 2007 +0100
+++ b/mcabber/src/screen.c Fri Nov 09 19:32:45 2007 +0100
@@ -2397,10 +2397,18 @@
guint isspe;
guint *p_closebuf;
const char *cjid;
+ guint hold_chatmode = FALSE;
if (jid) {
cjid = jid;
isspe = FALSE;
+ // If closebuf is TRUE, it's probably better not to leave chat mode
+ // if the change isn't related to the current buffer.
+ if (closebuf && current_buddy) {
+ if (buddy_gettype(BUDDATA(current_buddy)) & ROSTER_TYPE_SPECIAL ||
+ strcasecmp(jid, CURRENT_JID))
+ hold_chatmode = TRUE;
+ }
} else {
// Get win_entry
if (!current_buddy) return;
@@ -2415,7 +2423,7 @@
*p_closebuf = closebuf;
buffer_purge((gpointer)cjid, win_entry, p_closebuf);
g_free(p_closebuf);
- if (closebuf) {
+ if (closebuf && !hold_chatmode) {
scr_set_chatmode(FALSE);
currentWindow = NULL;
}