diff options
| author | Simeon Simeonov | 2018-04-15 21:58:06 +0200 |
|---|---|---|
| committer | Simeon Simeonov | 2018-04-15 21:58:06 +0200 |
| commit | 7f2064ed526db2e54b3ebde04e58beaffbb397ed (patch) | |
| tree | 5aac51841b582d89489c37e6b2a303840e7cfb87 /src | |
| parent | a651d4876f775a2b00f88df49ead47557c6cc18e (diff) | |
Finish master password unload issue. Fix an old bug reintroduced by the magic of copy & paste
Diffstat (limited to 'src')
| -rw-r--r-- | src/inputdialog.c | 17 | ||||
| -rw-r--r-- | src/main.c | 3 |
2 files changed, 14 insertions, 6 deletions
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) | |||
| 159 | 159 | ||
| 160 | gchar *input_dialog_query_master_password(void) | 160 | gchar *input_dialog_query_master_password(void) |
| 161 | { | 161 | { |
| 162 | return input_dialog_with_invisible(_("Input password"), | 162 | gchar *mp_input; |
| 163 | _("Master password"), | 163 | |
| 164 | NULL); | 164 | mp_input = input_dialog_with_invisible(_("Input password"), |
| 165 | _("Master password"), | ||
| 166 | NULL); | ||
| 167 | |||
| 168 | if (prefs_common.use_master_password && | ||
| 169 | prefs_common.auto_unload_master_password) | ||
| 170 | { | ||
| 171 | g_timeout_add(1000 * 30, unload_master_password, NULL); | ||
| 172 | debug_print("Master password to be unloaded in 30 seconds\n"); | ||
| 173 | } | ||
| 174 | |||
| 175 | return mp_input; | ||
| 165 | } | 176 | } |
| 166 | 177 | ||
| 167 | gchar *input_dialog_set_new_password(guint max_attempts) | 178 | gchar *input_dialog_set_new_password(guint max_attempts) |
| @@ -426,9 +426,6 @@ int main(int argc, char *argv[]) | |||
| 426 | if (prefs_common.auto_unload_master_password && master_password_active()) { | 426 | if (prefs_common.auto_unload_master_password && master_password_active()) { |
| 427 | debug_print("Auto unloading master password\n"); | 427 | debug_print("Auto unloading master password\n"); |
| 428 | unload_master_password(); | 428 | unload_master_password(); |
| 429 | /* call this function every 10th minute in case a reload took place */ | ||
| 430 | /* TODO: Perhaps a more elegant solution could be developed */ | ||
| 431 | g_timeout_add(1000 * 60 * 10, unload_master_password, NULL); | ||
| 432 | } | 429 | } |
| 433 | #endif | 430 | #endif |
| 434 | 431 | ||
