mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
When /SET autoclose_windows is ON, don't destroy windows if they have
some level set (like /join -w + /part in status window) git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1327 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
ab5166033c
commit
1a61f989e1
@ -69,11 +69,8 @@ static void signal_channel_destroyed(CHANNEL_REC *channel)
|
|||||||
/* kicked out from channel */
|
/* kicked out from channel */
|
||||||
window_bind_add(window, channel->server->tag,
|
window_bind_add(window, channel->server->tag,
|
||||||
channel->name);
|
channel->name);
|
||||||
} else if (settings_get_bool("autoclose_windows") &&
|
} else if (!channel->joined || channel->left)
|
||||||
(!channel->joined || channel->left) &&
|
window_auto_destroy(window);
|
||||||
window->items == NULL && windows->next != NULL) {
|
|
||||||
window_destroy(window);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void signal_window_item_destroy(WINDOW_REC *window, WI_ITEM_REC *item)
|
static void signal_window_item_destroy(WINDOW_REC *window, WI_ITEM_REC *item)
|
||||||
|
@ -83,9 +83,8 @@ static void signal_query_destroyed(QUERY_REC *query)
|
|||||||
if (window != NULL) {
|
if (window != NULL) {
|
||||||
window_item_destroy((WI_ITEM_REC *) query);
|
window_item_destroy((WI_ITEM_REC *) query);
|
||||||
|
|
||||||
if (window->items == NULL && windows->next != NULL &&
|
if (!query->unwanted)
|
||||||
!query->unwanted && settings_get_bool("autoclose_windows"))
|
window_auto_destroy(window);
|
||||||
window_destroy(window);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,6 +130,13 @@ void window_destroy(WINDOW_REC *window)
|
|||||||
g_free(window);
|
g_free(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void window_auto_destroy(WINDOW_REC *window)
|
||||||
|
{
|
||||||
|
if (settings_get_bool("autoclose_windows") && windows->next != NULL &&
|
||||||
|
window->items == NULL && window->level == 0)
|
||||||
|
window_destroy(window);
|
||||||
|
}
|
||||||
|
|
||||||
void window_set_active(WINDOW_REC *window)
|
void window_set_active(WINDOW_REC *window)
|
||||||
{
|
{
|
||||||
WINDOW_REC *old_window;
|
WINDOW_REC *old_window;
|
||||||
|
@ -59,6 +59,8 @@ extern WINDOW_REC *active_win;
|
|||||||
WINDOW_REC *window_create(WI_ITEM_REC *item, int automatic);
|
WINDOW_REC *window_create(WI_ITEM_REC *item, int automatic);
|
||||||
void window_destroy(WINDOW_REC *window);
|
void window_destroy(WINDOW_REC *window);
|
||||||
|
|
||||||
|
void window_auto_destroy(WINDOW_REC *window);
|
||||||
|
|
||||||
void window_set_active(WINDOW_REC *window);
|
void window_set_active(WINDOW_REC *window);
|
||||||
void window_change_server(WINDOW_REC *window, void *server);
|
void window_change_server(WINDOW_REC *window, void *server);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user