Another logic fix for handling master password change dialog.
authorAndrej Kacian <ticho@claws-mail.org>
Wed, 10 Feb 2016 18:46:11 +0000 (19:46 +0100)
committerAndrej Kacian <ticho@claws-mail.org>
Wed, 10 Feb 2016 18:46:11 +0000 (19:46 +0100)
src/prefs_other.c

index 01a6f54..405a374 100644 (file)
@@ -716,6 +716,15 @@ static void prefs_other_save(PrefsPage *_page)
                        GTK_TOGGLE_BUTTON(page->checkbtn_use_password))
                        && master_password_is_set()) {
                master_password_change(NULL);
+
+               /* In case user did not finish the password change process
+                * (e.g. did not enter a correct current master password),
+                * we need to enable the "use master password" checkbox again,
+                * since the old master password is still valid. */
+               if (master_password_is_set()) {
+                       gtk_toggle_button_set_active(
+                               GTK_TOGGLE_BUTTON(page->checkbtn_use_password), TRUE);
+               }
        }
 
        if (gtk_toggle_button_get_active(