summaryrefslogtreecommitdiff
path: root/Applications/FileManager/PropertiesDialog.cpp
diff options
context:
space:
mode:
authorAndres Vieira <anvieiravazquez@gmail.com>2020-04-28 13:18:36 +0200
committerAndreas Kling <kling@serenityos.org>2020-04-28 15:14:02 +0200
commitb9df3c3318dd38d6371d4adb09af368d06fa6ee7 (patch)
tree0b766dc948a1aa5a8a0150e9b80092c8b91de28d /Applications/FileManager/PropertiesDialog.cpp
parentbe8dc41b9c6a8b06bf0891e2205edf6065a200a5 (diff)
downloadserenity-b9df3c3318dd38d6371d4adb09af368d06fa6ee7.zip
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.
Diffstat (limited to 'Applications/FileManager/PropertiesDialog.cpp')
-rw-r--r--Applications/FileManager/PropertiesDialog.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/Applications/FileManager/PropertiesDialog.cpp b/Applications/FileManager/PropertiesDialog.cpp
index f4d2f87d17..a33e27dadb 100644
--- a/Applications/FileManager/PropertiesDialog.cpp
+++ b/Applications/FileManager/PropertiesDialog.cpp
@@ -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"));