From 7f2064ed526db2e54b3ebde04e58beaffbb397ed Mon Sep 17 00:00:00 2001 From: Simeon Simeonov Date: Sun, 15 Apr 2018 21:58:06 +0200 Subject: Finish master password unload issue. Fix an old bug reintroduced by the magic of copy & paste --- src/inputdialog.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'src/inputdialog.c') diff --git a/src/inputdialog.c b/src/inputdialog.c index 2510bbb..cdfb997 100644 --- a/src/inputdialog.c +++ b/src/inputdialog.c @@ -159,9 +159,20 @@ gchar *input_dialog_query_password(const gchar *server, const gchar *user) gchar *input_dialog_query_master_password(void) { - return input_dialog_with_invisible(_("Input password"), - _("Master password"), - NULL); + gchar *mp_input; + + mp_input = input_dialog_with_invisible(_("Input password"), + _("Master password"), + NULL); + + if (prefs_common.use_master_password && + prefs_common.auto_unload_master_password) + { + g_timeout_add(1000 * 30, unload_master_password, NULL); + debug_print("Master password to be unloaded in 30 seconds\n"); + } + + return mp_input; } gchar *input_dialog_set_new_password(guint max_attempts) -- cgit v1.3