summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-03-28 03:38:23 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-03-28 03:38:23 +0100
commitb6c5bd3d28436f0e73e7e507750bb0460d2bea2b (patch)
treeeb132f07e84fd7d7e79e75196fe50c85762ef506
parent6e7d5e0114b44e97c88ea417f80bdc80a30c0877 (diff)
downloadserenity-b6c5bd3d28436f0e73e7e507750bb0460d2bea2b.zip
FileManager: Add back/forward buttons (placeholders.)
-rw-r--r--Applications/FileManager/main.cpp18
-rw-r--r--Base/res/icons/16x16/go-back.pngbin0 -> 211 bytes
-rw-r--r--Base/res/icons/16x16/go-forward.pngbin0 -> 210 bytes
3 files changed, 17 insertions, 1 deletions
diff --git a/Applications/FileManager/main.cpp b/Applications/FileManager/main.cpp
index fab1f4cf03..029f084b88 100644
--- a/Applications/FileManager/main.cpp
+++ b/Applications/FileManager/main.cpp
@@ -97,6 +97,14 @@ int main(int argc, char** argv)
dbgprintf("'Delete' action activated!\n");
});
+ auto go_back_action = GAction::create("Go Back", GraphicsBitmap::load_from_file("/res/icons/16x16/go-back.png"), [] (const GAction&) {
+ dbgprintf("'Go Back' action activated!\n");
+ });
+
+ auto go_forward_action = GAction::create("Go Forward", GraphicsBitmap::load_from_file("/res/icons/16x16/go-forward.png"), [] (const GAction&) {
+ dbgprintf("'Go Forward' action activated!\n");
+ });
+
auto menubar = make<GMenuBar>();
auto app_menu = make<GMenu>("FileManager");
@@ -107,7 +115,6 @@ int main(int argc, char** argv)
menubar->add_menu(move(app_menu));
auto file_menu = make<GMenu>("File");
- file_menu->add_action(open_parent_directory_action.copy_ref());
file_menu->add_action(mkdir_action.copy_ref());
file_menu->add_action(copy_action.copy_ref());
file_menu->add_action(delete_action.copy_ref());
@@ -118,6 +125,11 @@ int main(int argc, char** argv)
view_menu->add_action(view_as_icons_action.copy_ref());
menubar->add_menu(move(view_menu));
+ auto go_menu = make<GMenu>("Go");
+ go_menu->add_action(go_back_action.copy_ref());
+ go_menu->add_action(go_forward_action.copy_ref());
+ go_menu->add_action(open_parent_directory_action.copy_ref());
+
auto help_menu = make<GMenu>("Help");
help_menu->add_action(GAction::create("About", [] (const GAction&) {
dbgprintf("FIXME: Implement Help/About\n");
@@ -126,7 +138,11 @@ int main(int argc, char** argv)
app.set_menubar(move(menubar));
+ main_toolbar->add_action(go_back_action.copy_ref());
+ main_toolbar->add_action(go_forward_action.copy_ref());
main_toolbar->add_action(open_parent_directory_action.copy_ref());
+
+ main_toolbar->add_separator();
main_toolbar->add_action(mkdir_action.copy_ref());
main_toolbar->add_action(copy_action.copy_ref());
main_toolbar->add_action(delete_action.copy_ref());
diff --git a/Base/res/icons/16x16/go-back.png b/Base/res/icons/16x16/go-back.png
new file mode 100644
index 0000000000..6a98c51845
--- /dev/null
+++ b/Base/res/icons/16x16/go-back.png
Binary files differ
diff --git a/Base/res/icons/16x16/go-forward.png b/Base/res/icons/16x16/go-forward.png
new file mode 100644
index 0000000000..207ece289d
--- /dev/null
+++ b/Base/res/icons/16x16/go-forward.png
Binary files differ