mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
MailSettings: Set window modified state
This commit is contained in:
parent
ab2bbaabc7
commit
c7d038cc26
Notes:
sideshowbarker
2024-07-17 12:00:58 +09:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/SerenityOS/serenity/commit/c7d038cc26 Pull-request: https://github.com/SerenityOS/serenity/pull/14006 Reviewed-by: https://github.com/MacDue
1 changed files with 12 additions and 0 deletions
|
@ -46,15 +46,27 @@ MailSettingsWidget::MailSettingsWidget()
|
||||||
|
|
||||||
m_server_inputbox = *find_descendant_of_type_named<GUI::TextBox>("server_input");
|
m_server_inputbox = *find_descendant_of_type_named<GUI::TextBox>("server_input");
|
||||||
m_server_inputbox->set_text(Config::read_string("Mail", "Connection", "Server", ""));
|
m_server_inputbox->set_text(Config::read_string("Mail", "Connection", "Server", ""));
|
||||||
|
m_server_inputbox->on_change = [&]() {
|
||||||
|
set_modified(true);
|
||||||
|
};
|
||||||
|
|
||||||
m_port_combobox = *find_descendant_of_type_named<GUI::ComboBox>("port_input");
|
m_port_combobox = *find_descendant_of_type_named<GUI::ComboBox>("port_input");
|
||||||
m_port_combobox->set_text(Config::read_string("Mail", "Connection", "Port", "993"));
|
m_port_combobox->set_text(Config::read_string("Mail", "Connection", "Port", "993"));
|
||||||
m_port_combobox->set_only_allow_values_from_model(false);
|
m_port_combobox->set_only_allow_values_from_model(false);
|
||||||
m_port_combobox->set_model(*GUI::ItemListModel<String>::create(m_common_ports));
|
m_port_combobox->set_model(*GUI::ItemListModel<String>::create(m_common_ports));
|
||||||
|
m_port_combobox->on_change = [&](auto, auto) {
|
||||||
|
set_modified(true);
|
||||||
|
};
|
||||||
|
|
||||||
m_tls_checkbox = *find_descendant_of_type_named<GUI::CheckBox>("tls_input");
|
m_tls_checkbox = *find_descendant_of_type_named<GUI::CheckBox>("tls_input");
|
||||||
m_tls_checkbox->set_checked(Config::read_bool("Mail", "Connection", "TLS", false));
|
m_tls_checkbox->set_checked(Config::read_bool("Mail", "Connection", "TLS", false));
|
||||||
|
m_tls_checkbox->on_checked = [&](auto) {
|
||||||
|
set_modified(true);
|
||||||
|
};
|
||||||
|
|
||||||
m_email_inputbox = *find_descendant_of_type_named<GUI::TextBox>("email_input");
|
m_email_inputbox = *find_descendant_of_type_named<GUI::TextBox>("email_input");
|
||||||
m_email_inputbox->set_text(Config::read_string("Mail", "User", "Username", ""));
|
m_email_inputbox->set_text(Config::read_string("Mail", "User", "Username", ""));
|
||||||
|
m_email_inputbox->on_change = [&]() {
|
||||||
|
set_modified(true);
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue