From 9beaf82839472e2c68897605370aeefd18224a86 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Wed, 8 Aug 2001 15:29:56 +0000 Subject: [PATCH] /SET autofocus_new_items ON - if newly created window items should be set active automatically. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1718 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-common/core/window-items.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/fe-common/core/window-items.c b/src/fe-common/core/window-items.c index a263a7fd..43e6413d 100644 --- a/src/fe-common/core/window-items.c +++ b/src/fe-common/core/window-items.c @@ -52,7 +52,8 @@ void window_item_add(WINDOW_REC *window, WI_ITEM_REC *item, int automatic) window->items = g_slist_append(window->items, item); signal_emit("window item new", 2, window, item); - if (!automatic || g_slist_length(window->items) == 1) { + if (g_slist_length(window->items) == 1 || + (!automatic && settings_get_bool("autofocus_new_items"))) { window->active = NULL; window_item_set_active(window, item); } @@ -313,6 +314,7 @@ void window_items_init(void) { settings_add_bool("lookandfeel", "reuse_unused_windows", FALSE); settings_add_bool("lookandfeel", "autocreate_windows", TRUE); + settings_add_bool("lookandfeel", "autofocus_new_items", TRUE); signal_add_last("window item changed", (SIGNAL_FUNC) signal_window_item_changed); }