summaryrefslogtreecommitdiff
path: root/Userland/Demos
diff options
context:
space:
mode:
authorKarol Kosek <krkk@serenityos.org>2023-04-16 11:56:01 +0200
committerAndreas Kling <kling@serenityos.org>2023-04-19 07:59:54 +0200
commit969543a847c7792cb5ebe967c44b744bc24fb2cb (patch)
tree1c5ee0e5040655c0783bc4940d158af192e5c755 /Userland/Demos
parent60a338758ce1b8bcf09f00cc9ba4694348292a91 (diff)
downloadserenity-969543a847c7792cb5ebe967c44b744bc24fb2cb.zip
LibGUI+Userland: Make Window::*add_menu take name using new string
Diffstat (limited to 'Userland/Demos')
-rw-r--r--Userland/Demos/Eyes/main.cpp4
-rw-r--r--Userland/Demos/LibGfxDemo/main.cpp2
-rw-r--r--Userland/Demos/LibGfxScaleDemo/main.cpp2
-rw-r--r--Userland/Demos/Mandelbrot/Mandelbrot.cpp6
-rw-r--r--Userland/Demos/Screensaver/main.cpp4
5 files changed, 9 insertions, 9 deletions
diff --git a/Userland/Demos/Eyes/main.cpp b/Userland/Demos/Eyes/main.cpp
index 66b5eabd4c..053a6640d8 100644
--- a/Userland/Demos/Eyes/main.cpp
+++ b/Userland/Demos/Eyes/main.cpp
@@ -84,12 +84,12 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
set_window_frame_enabled(!hide_window_frame);
show_window_frame_action->set_checked(window_frame_enabled);
- auto file_menu = TRY(window->try_add_menu("&File"));
+ auto file_menu = TRY(window->try_add_menu("&File"_short_string));
TRY(file_menu->try_add_action(move(show_window_frame_action)));
TRY(file_menu->try_add_separator());
TRY(file_menu->try_add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); })));
- auto help_menu = TRY(window->try_add_menu("&Help"));
+ auto help_menu = TRY(window->try_add_menu("&Help"_short_string));
TRY(help_menu->try_add_action(GUI::CommonActions::make_command_palette_action(window)));
TRY(help_menu->try_add_action(GUI::CommonActions::make_help_action([](auto&) {
Desktop::Launcher::open(URL::create_with_file_scheme("/usr/share/man/man1/Eyes.md"), "/bin/Help");
diff --git a/Userland/Demos/LibGfxDemo/main.cpp b/Userland/Demos/LibGfxDemo/main.cpp
index 3209290ffc..b2c73a3821 100644
--- a/Userland/Demos/LibGfxDemo/main.cpp
+++ b/Userland/Demos/LibGfxDemo/main.cpp
@@ -197,7 +197,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
window->set_resizable(false);
window->resize(WIDTH, HEIGHT);
- auto file_menu = TRY(window->try_add_menu("&File"));
+ auto file_menu = TRY(window->try_add_menu("&File"_short_string));
TRY(file_menu->try_add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); })));
auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-libgfx-demo"sv));
diff --git a/Userland/Demos/LibGfxScaleDemo/main.cpp b/Userland/Demos/LibGfxScaleDemo/main.cpp
index 8e54da69b7..d0222ee4f4 100644
--- a/Userland/Demos/LibGfxScaleDemo/main.cpp
+++ b/Userland/Demos/LibGfxScaleDemo/main.cpp
@@ -116,7 +116,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
window->set_resizable(false);
window->resize(WIDTH * 2, HEIGHT * 3);
- auto file_menu = TRY(window->try_add_menu("&File"));
+ auto file_menu = TRY(window->try_add_menu("&File"_short_string));
TRY(file_menu->try_add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); })));
auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-libgfx-demo"sv));
diff --git a/Userland/Demos/Mandelbrot/Mandelbrot.cpp b/Userland/Demos/Mandelbrot/Mandelbrot.cpp
index b3c3064d21..5d38b1f46d 100644
--- a/Userland/Demos/Mandelbrot/Mandelbrot.cpp
+++ b/Userland/Demos/Mandelbrot/Mandelbrot.cpp
@@ -413,7 +413,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
window->resize(window->minimum_size() * 2);
auto mandelbrot = TRY(window->set_main_widget<Mandelbrot>());
- auto file_menu = TRY(window->try_add_menu("&File"));
+ auto file_menu = TRY(window->try_add_menu("&File"_short_string));
auto& export_submenu = file_menu->add_submenu("&Export");
@@ -469,12 +469,12 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
auto app_icon = GUI::Icon::default_icon("app-mandelbrot"sv);
window->set_icon(app_icon.bitmap_for_size(16));
- auto view_menu = TRY(window->try_add_menu("&View"));
+ auto view_menu = TRY(window->try_add_menu("&View"_short_string));
TRY(view_menu->try_add_action(zoom_in_action));
TRY(view_menu->try_add_action(reset_zoom_action));
TRY(view_menu->try_add_action(zoom_out_action));
- auto help_menu = TRY(window->try_add_menu("&Help"));
+ auto help_menu = TRY(window->try_add_menu("&Help"_short_string));
TRY(help_menu->try_add_action(GUI::CommonActions::make_command_palette_action(window)));
TRY(help_menu->try_add_action(GUI::CommonActions::make_about_action("Mandelbrot Demo", app_icon, window)));
diff --git a/Userland/Demos/Screensaver/main.cpp b/Userland/Demos/Screensaver/main.cpp
index c72251eafa..372fc35016 100644
--- a/Userland/Demos/Screensaver/main.cpp
+++ b/Userland/Demos/Screensaver/main.cpp
@@ -76,12 +76,12 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
window->set_title("Screensaver");
window->resize(360, 240);
- auto file_menu = TRY(window->try_add_menu("&File"));
+ auto file_menu = TRY(window->try_add_menu("&File"_short_string));
file_menu->add_action(GUI::CommonActions::make_quit_action([&](auto&) {
app->quit();
}));
- auto help_menu = TRY(window->try_add_menu("&Help"));
+ auto help_menu = TRY(window->try_add_menu("&Help"_short_string));
TRY(help_menu->try_add_action(GUI::CommonActions::make_command_palette_action(window)));
TRY(help_menu->try_add_action(GUI::CommonActions::make_about_action("Screensaver", app_icon, window)));