1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:37:35 +00:00

FileManager: Enable/Disable mkdir and touch actions on path change

This change disables the icons in read-only directories.
This commit is contained in:
Karol Kosek 2021-07-25 23:11:47 +02:00 committed by Gunnar Beutner
parent 755fe2b0ca
commit 92fd86901d

View file

@ -996,6 +996,8 @@ int run_in_windowed_mode(RefPtr<Core::ConfigFile> config, String initial_locatio
return;
}
mkdir_action->set_enabled(can_write_in_path);
touch_action->set_enabled(can_write_in_path);
paste_action->set_enabled(can_write_in_path && GUI::Clipboard::the().mime_type() == "text/uri-list");
go_forward_action->set_enabled(directory_view.path_history_position() < directory_view.path_history_size() - 1);
go_back_action->set_enabled(directory_view.path_history_position() > 0);