mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-26 20:55:35 +03:00
FileManager: Add a toolbar button for going to the home directory.
Fixes #308.
This commit is contained in:
parent
aa2224a2f0
commit
5f0f1ce9d2
Notes:
sideshowbarker
2024-07-19 13:07:06 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/5f0f1ce9d29
@ -144,6 +144,10 @@ int main(int argc, char** argv)
|
||||
directory_view->open_next_directory();
|
||||
});
|
||||
|
||||
auto go_home_action = GAction::create("Go to Home Directory", GraphicsBitmap::load_from_file("/res/icons/16x16/go-home.png"), [directory_view](auto&) {
|
||||
directory_view->open(get_current_user_home_path());
|
||||
});
|
||||
|
||||
auto menubar = make<GMenuBar>();
|
||||
|
||||
auto app_menu = make<GMenu>("File Manager");
|
||||
@ -181,6 +185,7 @@ int main(int argc, char** argv)
|
||||
main_toolbar->add_action(go_back_action);
|
||||
main_toolbar->add_action(go_forward_action);
|
||||
main_toolbar->add_action(open_parent_directory_action);
|
||||
main_toolbar->add_action(go_home_action);
|
||||
|
||||
main_toolbar->add_separator();
|
||||
main_toolbar->add_action(mkdir_action);
|
||||
|
BIN
Base/res/icons/16x16/go-home.png
Normal file
BIN
Base/res/icons/16x16/go-home.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 183 B |
Loading…
Reference in New Issue
Block a user