diff options
author | James Booth <boothj5@gmail.com> | 2013-05-22 23:48:24 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2013-05-22 23:48:24 +0100 |
commit | 0ced96f57848e017d52190139a94bb2c2caeed78 (patch) | |
tree | da350e6b32d09e10b4b5000e4b57c225dd61ab2b /src | |
parent | d017999a91278f6c51aa42075c4a86a386806a52 (diff) | |
download | profani-tty-0ced96f57848e017d52190139a94bb2c2caeed78.tar.gz |
Do not close MUC windows on /wins prune
closes #172
Diffstat (limited to 'src')
-rw-r--r-- | src/ui/core.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/ui/core.c b/src/ui/core.c index 1b6c8790..f4d95abe 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -665,12 +665,15 @@ ui_prune_wins(void) gboolean pruned = FALSE; for (curr = 1; curr <= 9; curr++) { - if (ui_win_exists(curr) && (ui_win_unread(curr) == 0)) { - if (conn_status == JABBER_CONNECTED) { - ui_close_connected_win(curr); + if (ui_win_exists(curr)) { + win_type_t win_type = windows[curr]->type; + if ((ui_win_unread(curr) == 0) && (win_type != WIN_MUC)) { + if (conn_status == JABBER_CONNECTED) { + ui_close_connected_win(curr); + } + ui_close_win(curr); + pruned = TRUE; } - ui_close_win(curr); - pruned = TRUE; } } |