Mercurial > ~mikael > mcabber > hg
diff mcabber/src/screen.c @ 1135:5d7c05932b13
Add command /buffer close
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sat, 03 Feb 2007 20:05:57 +0100 |
parents | 9dd28a56128f |
children | 5752017f6e2b |
line wrap: on
line diff
--- a/mcabber/src/screen.c Sat Feb 03 18:31:55 2007 +0100 +++ b/mcabber/src/screen.c Sat Feb 03 20:05:57 2007 +0100 @@ -1753,9 +1753,10 @@ update_panels(); } -// scr_BufferPurge() +// scr_BufferPurge(closebuf) // Purge/Drop the current buddy buffer -void scr_BufferPurge(void) +// If closebuf is 1, close the buffer. +void scr_BufferPurge(int closebuf) { winbuf *win_entry; guint isspe; @@ -1776,6 +1777,11 @@ win_entry->cleared = FALSE; win_entry->top = NULL; + if (closebuf && !isspe) { + scr_set_chatmode(FALSE); + g_hash_table_remove(winbufhash, CURRENT_JID); + } + // Refresh the window scr_UpdateBuddyWindow();