diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2023-02-06 15:42:13 +0000 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-02-19 01:09:09 +0100 |
commit | f5cf41eb5dabba687100271aeb559eda45aaadb5 (patch) | |
tree | 64def4681604e4283bd61257a6c30210e061d527 /Userland/Applications | |
parent | fcb52597965053aee5f2281e4011bf60e1bcdf36 (diff) | |
download | serenity-f5cf41eb5dabba687100271aeb559eda45aaadb5.zip |
LibGUI+FileManager: Move `has_{parent,child}_segment` logic into BCB
Diffstat (limited to 'Userland/Applications')
-rw-r--r-- | Userland/Applications/FileManager/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Applications/FileManager/main.cpp b/Userland/Applications/FileManager/main.cpp index 0fcabe2b8f..4f3b96a657 100644 --- a/Userland/Applications/FileManager/main.cpp +++ b/Userland/Applications/FileManager/main.cpp @@ -1155,8 +1155,8 @@ ErrorOr<int> run_in_windowed_mode(DeprecatedString const& initial_location, Depr paste_action->set_enabled(can_write_in_path && GUI::Clipboard::the().fetch_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); - open_parent_directory_action->set_enabled(new_path != "/"); - open_child_directory_action->set_enabled(breadcrumbbar.selected_segment().has_value() && *breadcrumbbar.selected_segment() < breadcrumbbar.segment_count() - 1); + open_parent_directory_action->set_enabled(breadcrumbbar.has_parent_segment()); + open_child_directory_action->set_enabled(breadcrumbbar.has_child_segment()); directory_view->view_as_table_action().set_enabled(can_read_in_path); directory_view->view_as_icons_action().set_enabled(can_read_in_path); directory_view->view_as_columns_action().set_enabled(can_read_in_path); |