1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-29 01:45:34 +00:00

The attached patch is quite special, as it fulfills a personal need. It

adds a boolean configuration file option ui.sessions.keep_session_active
that'll change elinks' behaviour to not terminate the session, if the
last terminal exits. That allows me to re-use entered passwords after
closing all elinks terminals. Maybe some others will find this feature
useful too and it can be included in elinks.

I guess the best would be to combine this feature with an remote command
named terminate() to terminate the background elinks instance.
This commit is contained in:
Sven Wegener 2005-10-11 01:22:38 +02:00 committed by Jonas Fonseca
parent 484d07bb4d
commit eb14866bb4
2 changed files with 7 additions and 1 deletions

View File

@ -1192,6 +1192,10 @@ static struct option_info config_options_info[] = {
"sessions", OPT_SORT,
N_("Sessions settings.")),
INIT_OPT_BOOL("ui.sessions", N_("Keep session active"),
"keep_session_active", 0, 0,
N_("Keep the session active even if the last terminal exits.")),
INIT_OPT_BOOL("ui.sessions", N_("Auto save session"),
"auto_save", 0, 0,
N_("Automatically save the session when quitting.\n"

View File

@ -15,6 +15,7 @@
#include "elinks.h"
#include "bookmarks/bookmarks.h"
#include "config/options.h"
#include "intl/gettext/libintl.h"
#include "main/main.h"
#include "main/object.h"
@ -161,7 +162,8 @@ destroy_all_terminals(void)
static void
check_if_no_terminal(void)
{
program.terminate = list_empty(terminals);
program.terminate = list_empty(terminals)
&& !get_opt_bool("ui.sessions.keep_session_active");
}
void