Mail: Use GUI::PasswordInputDialog to ask for server passwords

This commit is contained in:
Andreas Kling 2021-08-02 10:11:34 +02:00
parent 1f51b72e6d
commit de7f1bfd58
Notes: sideshowbarker 2024-07-18 07:35:35 +09:00

View file

@ -11,9 +11,9 @@
#include <LibDesktop/Launcher.h>
#include <LibGUI/Action.h>
#include <LibGUI/Clipboard.h>
#include <LibGUI/InputBox.h>
#include <LibGUI/Menu.h>
#include <LibGUI/MessageBox.h>
#include <LibGUI/PasswordInputDialog.h>
#include <LibGUI/Statusbar.h>
#include <LibGUI/TableView.h>
#include <LibGUI/TreeView.h>
@ -120,7 +120,7 @@ bool MailWidget::connect_and_login()
auto password = config->read_entry("User", "Password", {});
while (password.is_empty()) {
if (GUI::InputBox::show(window(), password, String::formatted("Enter password for {}:", username), "Login", {}, GUI::InputType::Password) != GUI::InputBox::ExecOK)
if (GUI::PasswordInputDialog::show(window(), password, "Login", server, username) != GUI::Dialog::ExecOK)
return false;
}