mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-23 08:00:20 +00:00
FileManager: Disable PropertiesDialog custom rename disabling logic
TextBox already handles well its disabled state so it's no use to have a way to prevent it from PropertiesDialog, too.
This commit is contained in:
parent
be8dc41b9c
commit
b9df3c3318
Notes:
sideshowbarker
2024-07-19 07:13:39 +09:00
Author: https://github.com/zlotny Commit: https://github.com/SerenityOS/serenity/commit/b9df3c3318d Pull-request: https://github.com/SerenityOS/serenity/pull/1996 Issue: https://github.com/SerenityOS/serenity/issues/1987
1 changed files with 4 additions and 7 deletions
|
@ -79,13 +79,10 @@ PropertiesDialog::PropertiesDialog(GUI::FileSystemModel& model, String path, boo
|
|||
m_name_box->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
|
||||
m_name_box->set_preferred_size({ 0, 22 });
|
||||
m_name_box->set_text(m_name);
|
||||
m_name_box->on_change = [&, disable_rename]() {
|
||||
if (disable_rename) {
|
||||
m_name_box->set_text(m_name); //FIXME: GUI::TextBox does not support set_enabled yet...
|
||||
} else {
|
||||
m_name_dirty = m_name != m_name_box->text();
|
||||
m_apply_button->set_enabled(true);
|
||||
}
|
||||
m_name_box->set_enabled(!disable_rename);
|
||||
m_name_box->on_change = [&]() {
|
||||
m_name_dirty = m_name != m_name_box->text();
|
||||
m_apply_button->set_enabled(true);
|
||||
};
|
||||
|
||||
set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/properties.png"));
|
||||
|
|
Loading…
Reference in a new issue