mirror of
https://github.com/irssi/irssi.git
synced 2026-08-10 20:33:46 +02:00
Support for "immortal" windows, that can't be closed until explicitly set to
mortal with /WINDOW IMMORTAL OFF. Status and msgs windows are immortal by default. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2422 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
59c5bb100a
commit
9bb16705a5
7 changed files with 69 additions and 7 deletions
|
|
@ -135,7 +135,7 @@ void window_auto_destroy(WINDOW_REC *window)
|
|||
{
|
||||
if (settings_get_bool("autoclose_windows") && windows->next != NULL &&
|
||||
window->items == NULL && window->bound_items == NULL &&
|
||||
window->level == 0)
|
||||
window->level == 0 && !window->immortal)
|
||||
window_destroy(window);
|
||||
}
|
||||
|
||||
|
|
@ -218,6 +218,14 @@ void window_set_level(WINDOW_REC *window, int level)
|
|||
signal_emit("window level changed", 1, window);
|
||||
}
|
||||
|
||||
void window_set_immortal(WINDOW_REC *window, int immortal)
|
||||
{
|
||||
g_return_if_fail(window != NULL);
|
||||
|
||||
window->immortal = immortal;
|
||||
signal_emit("window immortal changed", 1, window);
|
||||
}
|
||||
|
||||
/* return active item's name, or if none is active, window's name */
|
||||
char *window_get_active_name(WINDOW_REC *window)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue