mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-26 20:26:53 +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:
parent
755fe2b0ca
commit
92fd86901d
Notes:
sideshowbarker
2024-07-19 17:21:11 +09:00
Author: https://github.com/krkk
Commit: 92fd86901d
Pull-request: https://github.com/SerenityOS/serenity/pull/9143
Reviewed-by: https://github.com/AtkinsSJ ✅
1 changed files with 2 additions and 0 deletions
|
@ -996,6 +996,8 @@ int run_in_windowed_mode(RefPtr<Core::ConfigFile> config, String initial_locatio
|
||||||
return;
|
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");
|
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_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);
|
go_back_action->set_enabled(directory_view.path_history_position() > 0);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue