mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:27:46 +00:00
LibGUI+Applications: Use String in make_about_action()
This commit is contained in:
parent
e7a5a2e146
commit
ccab5ddf9b
53 changed files with 60 additions and 60 deletions
|
@ -564,7 +564,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
auto help_menu = window->add_menu("&Help"_string);
|
||||
help_menu->add_action(GUI::CommonActions::make_command_palette_action(window));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("3D File Viewer", app_icon, window));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("3D File Viewer"_string, app_icon, window));
|
||||
|
||||
window->show();
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ WindowActions::WindowActions(GUI::Window& window)
|
|||
&window));
|
||||
m_tab_actions.last()->set_status_tip("Switch to last tab"_string);
|
||||
|
||||
m_about_action = GUI::CommonActions::make_about_action("Ladybird", GUI::Icon::default_icon("app-browser"sv), &window);
|
||||
m_about_action = GUI::CommonActions::make_about_action("Ladybird"_string, GUI::Icon::default_icon("app-browser"sv), &window);
|
||||
|
||||
m_show_bookmarks_bar_action = GUI::Action::create_checkable(
|
||||
"&Bookmarks Bar", { Mod_Ctrl, Key_B },
|
||||
|
|
|
@ -123,7 +123,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
auto help_menu = window->add_menu("&Help"_string);
|
||||
help_menu->add_action(GUI::CommonActions::make_command_palette_action(window));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Calculator", app_icon, window));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Calculator"_string, app_icon, window));
|
||||
|
||||
window->show();
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ ErrorOr<NonnullRefPtr<CalendarWidget>> CalendarWidget::create(GUI::Window* paren
|
|||
|
||||
auto help_menu = parent_window->add_menu("&Help"_string);
|
||||
help_menu->add_action(GUI::CommonActions::make_command_palette_action(parent_window));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Calendar", TRY(GUI::Icon::try_create_default_icon("app-calendar"sv)), parent_window));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Calendar"_string, TRY(GUI::Icon::try_create_default_icon("app-calendar"sv)), parent_window));
|
||||
|
||||
return widget;
|
||||
}
|
||||
|
|
|
@ -169,7 +169,7 @@ ErrorOr<void> CharacterMapWidget::initialize_menubar(GUI::Window& window)
|
|||
help_menu->add_action(GUI::CommonActions::make_help_action([&](auto&) {
|
||||
Desktop::Launcher::open(URL::create_with_file_scheme("/usr/share/man/man1/Applications/CharacterMap.md"), "/bin/Help");
|
||||
}));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Character Map", GUI::Icon::default_icon("app-character-map"sv), &window));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Character Map"_string, GUI::Icon::default_icon("app-character-map"sv), &window));
|
||||
return {};
|
||||
}
|
||||
|
||||
|
|
|
@ -1071,7 +1071,7 @@ ErrorOr<int> run_in_windowed_mode(DeprecatedString const& initial_location, Depr
|
|||
|
||||
auto help_menu = window->add_menu("&Help"_string);
|
||||
help_menu->add_action(GUI::CommonActions::make_command_palette_action(window));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("File Manager"sv, GUI::Icon::default_icon("app-file-manager"sv), window));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("File Manager"_string, GUI::Icon::default_icon("app-file-manager"sv), window));
|
||||
|
||||
main_toolbar.add_action(go_back_action);
|
||||
main_toolbar.add_action(go_forward_action);
|
||||
|
|
|
@ -798,7 +798,7 @@ ErrorOr<void> MainWidget::initialize_menubar(GUI::Window& window)
|
|||
help_menu->add_action(GUI::CommonActions::make_help_action([](auto&) {
|
||||
Desktop::Launcher::open(URL::create_with_file_scheme("/usr/share/man/man1/Applications/FontEditor.md"), "/bin/Help");
|
||||
}));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Font Editor", TRY(GUI::Icon::try_create_default_icon("app-font-editor"sv)), &window));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Font Editor"_string, TRY(GUI::Icon::try_create_default_icon("app-font-editor"sv)), &window));
|
||||
|
||||
return {};
|
||||
}
|
||||
|
|
|
@ -221,7 +221,7 @@ ErrorOr<void> MainWidget::initialize_fallibles(GUI::Window& window)
|
|||
help_menu->add_action(GUI::Action::create("&Contents", { Key_F1 }, TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/filetype-unknown.png"sv)), [this, help_page_path = move(help_page_path)](auto&) {
|
||||
open_page(help_page_path);
|
||||
}));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Help", TRY(GUI::Icon::try_create_default_icon("app-help"sv)), &window));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Help"_string, TRY(GUI::Icon::try_create_default_icon("app-help"sv)), &window));
|
||||
|
||||
m_context_menu = TRY(GUI::Menu::try_create());
|
||||
m_context_menu->add_action(*m_go_back_action);
|
||||
|
|
|
@ -548,7 +548,7 @@ ErrorOr<void> HexEditorWidget::initialize_menubar(GUI::Window& window)
|
|||
help_menu->add_action(GUI::CommonActions::make_help_action([](auto&) {
|
||||
Desktop::Launcher::open(URL::create_with_file_scheme("/usr/share/man/man1/Applications/HexEditor.md"), "/bin/Help");
|
||||
}));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Hex Editor", GUI::Icon::default_icon("app-hex-editor"sv), &window));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Hex Editor"_string, GUI::Icon::default_icon("app-hex-editor"sv), &window));
|
||||
|
||||
return {};
|
||||
}
|
||||
|
|
|
@ -369,7 +369,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
help_menu->add_action(GUI::CommonActions::make_help_action([](auto&) {
|
||||
Desktop::Launcher::open(URL::create_with_file_scheme("/usr/share/man/man1/Applications/ImageViewer.md"), "/bin/Help");
|
||||
}));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Image Viewer", app_icon, window));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Image Viewer"_string, app_icon, window));
|
||||
|
||||
window->show();
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
auto help_menu = window->add_menu("&Help"_string);
|
||||
help_menu->add_action(GUI::CommonActions::make_command_palette_action(window));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Keyboard Mapper", app_icon, window));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Keyboard Mapper"_string, app_icon, window));
|
||||
|
||||
window->on_close_request = [&]() -> GUI::Window::CloseRequestDecision {
|
||||
if (keyboard_mapper_widget->request_close())
|
||||
|
|
|
@ -177,7 +177,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
help_menu->add_action(GUI::CommonActions::make_help_action([](auto&) {
|
||||
Desktop::Launcher::open(URL::create_with_file_scheme("/usr/share/man/man1/Applications/Magnifier.md"), "/bin/Help");
|
||||
}));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Magnifier", app_icon, window));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Magnifier"_string, app_icon, window));
|
||||
|
||||
window->show();
|
||||
window->set_always_on_top(true);
|
||||
|
|
|
@ -54,7 +54,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
auto help_menu = window->add_menu("&Help"_string);
|
||||
help_menu->add_action(GUI::CommonActions::make_command_palette_action(window));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Mail", app_icon, window));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Mail"_string, app_icon, window));
|
||||
|
||||
window->on_close_request = [&] {
|
||||
mail_widget->on_window_close();
|
||||
|
|
|
@ -80,7 +80,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
auto help_menu = window->add_menu("&Help"_string);
|
||||
help_menu->add_action(GUI::CommonActions::make_command_palette_action(window));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Maps", app_icon, window));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Maps"_string, app_icon, window));
|
||||
|
||||
// Main toolbar actions
|
||||
toolbar->add_action(show_users_action);
|
||||
|
|
|
@ -243,7 +243,7 @@ ErrorOr<void> PDFViewerWidget::initialize_menubar(GUI::Window& window)
|
|||
|
||||
auto help_menu = window.add_menu("&Help"_string);
|
||||
help_menu->add_action(GUI::CommonActions::make_command_palette_action(&window));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("PDF Viewer", GUI::Icon::default_icon("app-pdf-viewer"sv), &window));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("PDF Viewer"_string, GUI::Icon::default_icon("app-pdf-viewer"sv), &window));
|
||||
return {};
|
||||
}
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
auto help_menu = window->add_menu("&Help"_string);
|
||||
help_menu->add_action(GUI::CommonActions::make_command_palette_action(window));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Partition Editor", app_icon, window));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Partition Editor"_string, app_icon, window));
|
||||
|
||||
window->show();
|
||||
return app->exec();
|
||||
|
|
|
@ -88,7 +88,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
auto help_menu = window->add_menu("&Help"_string);
|
||||
help_menu->add_action(GUI::CommonActions::make_command_palette_action(window));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Piano", app_icon, window));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Piano"_string, app_icon, window));
|
||||
|
||||
window->show();
|
||||
|
||||
|
|
|
@ -1164,7 +1164,7 @@ ErrorOr<void> MainWidget::initialize_menubar(GUI::Window& window)
|
|||
|
||||
auto help_menu = window.add_menu("&Help"_string);
|
||||
help_menu->add_action(GUI::CommonActions::make_command_palette_action(&window));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Pixel Paint", GUI::Icon::default_icon("app-pixel-paint"sv), &window));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Pixel Paint"_string, GUI::Icon::default_icon("app-pixel-paint"sv), &window));
|
||||
|
||||
m_levels_dialog_action = GUI::Action::create(
|
||||
"Change &Levels...", { Mod_Ctrl, Key_L }, g_icon_bag.levels, [&](auto&) {
|
||||
|
|
|
@ -118,7 +118,7 @@ ErrorOr<void> PresenterWidget::initialize_menubar()
|
|||
update_slides_actions();
|
||||
|
||||
auto help_menu = window->add_menu("&Help"_string);
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Presenter", GUI::Icon::default_icon("app-presenter"sv)));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Presenter"_string, GUI::Icon::default_icon("app-presenter"sv)));
|
||||
|
||||
return {};
|
||||
}
|
||||
|
|
|
@ -99,7 +99,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
auto help_menu = window->add_menu("&Help"_string);
|
||||
help_menu->add_action(GUI::CommonActions::make_command_palette_action(window));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Settings", app_icon, window));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Settings"_string, app_icon, window));
|
||||
|
||||
auto main_widget = TRY(window->set_main_widget<GUI::Widget>());
|
||||
main_widget->set_fill_with_background_color(true);
|
||||
|
|
|
@ -165,7 +165,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
auto help_menu = window->add_menu("&Help"_string);
|
||||
help_menu->add_action(GUI::CommonActions::make_command_palette_action(window));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Sound Player", app_icon, window));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Sound Player"_string, app_icon, window));
|
||||
|
||||
window->show();
|
||||
return app->exec();
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include <LibGfx/Bitmap.h>
|
||||
#include <LibMain/Main.h>
|
||||
|
||||
static constexpr auto APP_NAME = "Space Analyzer"sv;
|
||||
static auto const APP_NAME = "Space Analyzer"_string;
|
||||
|
||||
static DeprecatedString get_absolute_path_to_selected_node(SpaceAnalyzer::TreeMapWidget const& tree_map_widget, bool include_last_node = true)
|
||||
{
|
||||
|
@ -48,7 +48,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
// Configure application window.
|
||||
auto app_icon = GUI::Icon::default_icon("app-space-analyzer"sv);
|
||||
auto window = TRY(GUI::Window::try_create());
|
||||
window->set_title(APP_NAME);
|
||||
window->set_title(APP_NAME.bytes_as_string_view());
|
||||
window->resize(640, 480);
|
||||
window->set_icon(app_icon.bitmap_for_size(16));
|
||||
|
||||
|
|
|
@ -293,7 +293,7 @@ SpreadsheetWidget::SpreadsheetWidget(GUI::Window& parent_window, Vector<NonnullR
|
|||
|
||||
m_search_action = GUI::CommonActions::make_command_palette_action(&parent_window);
|
||||
|
||||
m_about_action = GUI::CommonActions::make_about_action("Spreadsheet", GUI::Icon::default_icon("app-spreadsheet"sv), &parent_window);
|
||||
m_about_action = GUI::CommonActions::make_about_action("Spreadsheet"_string, GUI::Icon::default_icon("app-spreadsheet"sv), &parent_window);
|
||||
|
||||
toolbar.add_action(*m_new_action);
|
||||
toolbar.add_action(*m_open_action);
|
||||
|
|
|
@ -468,7 +468,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
auto help_menu = window->add_menu("&Help"_string);
|
||||
help_menu->add_action(GUI::CommonActions::make_command_palette_action(window));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("System Monitor", app_icon, window));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("System Monitor"_string, app_icon, window));
|
||||
|
||||
process_table_view.on_activation = [&](auto&) {
|
||||
if (process_properties_action->is_enabled())
|
||||
|
|
|
@ -423,7 +423,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
help_menu->add_action(GUI::CommonActions::make_help_action([](auto&) {
|
||||
Desktop::Launcher::open(URL::create_with_file_scheme("/usr/share/man/man1/Applications/Terminal.md"), "/bin/Help");
|
||||
}));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Terminal", app_icon, window));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Terminal"_string, app_icon, window));
|
||||
|
||||
window->on_close_request = [&]() -> GUI::Window::CloseRequestDecision {
|
||||
if (check_terminal_quit() == GUI::MessageBox::ExecResult::OK)
|
||||
|
|
|
@ -694,7 +694,7 @@ ErrorOr<void> MainWidget::initialize_menubar(GUI::Window& window)
|
|||
help_menu->add_action(GUI::CommonActions::make_help_action([](auto&) {
|
||||
Desktop::Launcher::open(URL::create_with_file_scheme("/usr/share/man/man1/Applications/TextEditor.md"), "/bin/Help");
|
||||
}));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Text Editor", GUI::Icon::default_icon("app-text-editor"sv), &window));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Text Editor"_string, GUI::Icon::default_icon("app-text-editor"sv), &window));
|
||||
|
||||
auto wrapping_statusbar_menu = m_line_column_statusbar_menu->add_submenu("&Wrapping Mode"_string);
|
||||
wrapping_statusbar_menu->add_action(*m_no_wrapping_action);
|
||||
|
|
|
@ -309,7 +309,7 @@ ErrorOr<void> MainWidget::initialize_menubar(GUI::Window& window)
|
|||
|
||||
auto help_menu = window.add_menu("&Help"_string);
|
||||
help_menu->add_action(GUI::CommonActions::make_command_palette_action(&window));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Theme Editor", GUI::Icon::default_icon("app-theme-editor"sv), &window));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Theme Editor"_string, GUI::Icon::default_icon("app-theme-editor"sv), &window));
|
||||
|
||||
return {};
|
||||
}
|
||||
|
|
|
@ -428,7 +428,7 @@ ErrorOr<void> VideoPlayerWidget::initialize_menubar(GUI::Window& window)
|
|||
|
||||
// Help menu
|
||||
auto help_menu = window.add_menu("&Help"_string);
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Video Player", TRY(GUI::Icon::try_create_default_icon("app-video-player"sv)), &window));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Video Player"_string, TRY(GUI::Icon::try_create_default_icon("app-video-player"sv)), &window));
|
||||
|
||||
return {};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue