1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 05:37:44 +00:00

Base+Userland: Apply Human Interface Guidelines to Object text

Corrects a slew of titles, buttons, labels, menu items and status bars
for capitalization, ellipses and punctuation.

Rewords a few actions and dialogs to use uniform language and
punctuation.
This commit is contained in:
thankyouverycool 2023-05-22 13:07:09 -04:00 committed by Andreas Kling
parent 024360e604
commit 02d94a303c
77 changed files with 195 additions and 188 deletions

View file

@ -289,7 +289,7 @@ void BrowserWindow::build_menus()
m_change_homepage_action = GUI::Action::create(
"Set Homepage URL...", g_icon_bag.go_home, [this](auto&) {
String homepage_url = String::from_deprecated_string(Config::read_string("Browser"sv, "Preferences"sv, "Home"sv, "about:blank"sv)).release_value_but_fixme_should_propagate_errors();
if (GUI::InputBox::show(this, homepage_url, "Enter URL"sv, "Change homepage URL"sv) == GUI::InputBox::ExecResult::OK) {
if (GUI::InputBox::show(this, homepage_url, "Enter a URL:"sv, "Change Homepage"sv) == GUI::InputBox::ExecResult::OK) {
if (URL(homepage_url).is_valid()) {
Config::write_string("Browser"sv, "Preferences"sv, "Home"sv, homepage_url);
Browser::g_home_url = homepage_url.to_deprecated_string();
@ -326,7 +326,7 @@ void BrowserWindow::build_menus()
m_color_scheme_actions.add_action(action);
};
add_color_scheme_action("Follow system theme", Web::CSS::PreferredColorScheme::Auto);
add_color_scheme_action("Follow System Theme", Web::CSS::PreferredColorScheme::Auto);
add_color_scheme_action("Light", Web::CSS::PreferredColorScheme::Light);
add_color_scheme_action("Dark", Web::CSS::PreferredColorScheme::Dark);
}

View file

@ -850,7 +850,7 @@ void Tab::show_storage_inspector()
if (!m_storage_widget) {
auto storage_window = GUI::Window::construct(&window());
storage_window->resize(500, 300);
storage_window->set_title("Storage inspector");
storage_window->set_title("Storage Inspector");
storage_window->set_icon(g_icon_bag.cookie);
m_storage_widget = storage_window->set_main_widget<StorageWidget>().release_value_but_fixme_should_propagate_errors();
m_storage_widget->on_update_cookie = [this](Web::Cookie::Cookie cookie) {

View file

@ -54,7 +54,7 @@ ErrorOr<NonnullRefPtr<AutoplaySettingsWidget>> AutoplaySettingsWidget::create()
widget->m_add_website_button->on_click = [widget](unsigned) {
String text;
if (GUI::InputBox::show(widget->window(), text, "Website:"sv, "Add website to autoplay allowlist"sv, GUI::InputType::NonemptyText) == GUI::Dialog::ExecResult::OK) {
if (GUI::InputBox::show(widget->window(), text, "Enter a website:"sv, "Add Autoplay Entry"sv, GUI::InputType::NonemptyText) == GUI::Dialog::ExecResult::OK) {
widget->m_allowlist_model->add_domain(move(text));
widget->set_modified(true);
}

View file

@ -10,7 +10,7 @@
}
@GUI::GroupBox {
title: "Autoplay Allowlist"
title: "Autoplay allowlist"
layout: @GUI::VerticalBoxLayout {
margins: [8]
}
@ -28,7 +28,7 @@
@GUI::Button {
name: "add_website_button"
fixed_width: 100
text: "Add website..."
text: "Add Website..."
}
}
}

View file

@ -49,7 +49,7 @@
}
@GUI::Label {
text: "New Tab:"
text: "New tab:"
text_alignment: "CenterLeft"
fixed_width: 45
}

View file

@ -142,7 +142,7 @@ ErrorOr<NonnullRefPtr<ContentFilterSettingsWidget>> ContentFilterSettingsWidget:
widget->m_add_new_domain_button->on_click = [widget](unsigned) {
String text;
if (GUI::InputBox::show(widget->window(), text, "Domain:"sv, "Add domain to Content Filter"sv, GUI::InputType::NonemptyText) == GUI::Dialog::ExecResult::OK) {
if (GUI::InputBox::show(widget->window(), text, "Enter a domain:"sv, "Add Content Filter"sv, GUI::InputType::NonemptyText) == GUI::Dialog::ExecResult::OK) {
widget->m_domain_list_model->add_domain(move(text));
widget->set_modified(true);
}

View file

@ -10,7 +10,7 @@
}
@GUI::GroupBox {
title: "Domain List"
title: "Domain list"
layout: @GUI::VerticalBoxLayout {
margins: [8]
}
@ -28,7 +28,7 @@
@GUI::Button {
name: "add_new_domain_button"
fixed_width: 100
text: "Add domain..."
text: "Add Domain..."
}
}
}

View file

@ -78,7 +78,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
Optional<unsigned> last_rounding_mode = 1;
for (unsigned i {}; i < rounding_modes.size(); ++i) {
auto round_action = GUI::Action::create_checkable(DeprecatedString::formatted("To &{} digits", rounding_modes[i]),
auto round_action = GUI::Action::create_checkable(DeprecatedString::formatted("To &{} Digits", rounding_modes[i]),
[&widget, rounding_mode = rounding_modes[i], &last_rounding_mode, i](auto&) {
widget->set_rounding_length(rounding_mode);
last_rounding_mode = i;
@ -88,10 +88,10 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
round_menu.add_action(*round_action);
}
constexpr auto format { "&Custom - {} ..."sv };
constexpr auto format { "&Custom - {}..."sv };
auto round_custom = GUI::Action::create_checkable(DeprecatedString::formatted(format, 0), [&](auto& action) {
int custom_rounding_length = widget->rounding_length();
auto result = GUI::InputBox::show_numeric(window, custom_rounding_length, 0, 100, "Round to"sv);
auto result = GUI::InputBox::show_numeric(window, custom_rounding_length, 0, 100, "Digits to Round"sv);
if (!result.is_error() && result.value() == GUI::Dialog::ExecResult::OK) {
action.set_text(DeprecatedString::formatted(format, custom_rounding_length));
widget->set_rounding_length(custom_rounding_length);
@ -105,7 +105,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
auto shrink_action = GUI::Action::create("&Shrink...", TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/edit-cut.png"sv)), [&](auto&) {
int shrink_length = widget->rounding_length();
auto result = GUI::InputBox::show_numeric(window, shrink_length, 0, 100, "Shrink to"sv);
auto result = GUI::InputBox::show_numeric(window, shrink_length, 0, 100, "Digits to Shrink"sv);
if (!result.is_error() && result.value() == GUI::Dialog::ExecResult::OK) {
round_custom->set_checked(true);
round_custom->set_text(DeprecatedString::formatted(format, shrink_length));

View file

@ -106,7 +106,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
if (default_view == "Year")
view_year_action->set_checked(true);
auto open_settings_action = GUI::Action::create("&Settings", {}, TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/app-settings.png"sv)), [&](GUI::Action const&) {
auto open_settings_action = GUI::Action::create("Calendar &Settings", {}, TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/app-settings.png"sv)), [&](GUI::Action const&) {
GUI::Process::spawn_or_show_error(window, "/bin/CalendarSettings"sv);
});

View file

@ -6,7 +6,7 @@
}
@GUI::GroupBox {
title: "Preferred First Day of Week"
title: "Preferred first day of week"
fixed_height: 72
layout: @GUI::VerticalBoxLayout {
margins: [6]
@ -37,7 +37,7 @@
}
@GUI::GroupBox {
title: "Preferred Weekend Configuration"
title: "Preferred weekend configuration"
fixed_height: 72
layout: @GUI::VerticalBoxLayout {
margins: [6]
@ -94,7 +94,7 @@
}
@GUI::GroupBox {
title: "Default View"
title: "Default view"
fixed_height: 72
layout: @GUI::VerticalBoxLayout {
margins: [6]

View file

@ -92,7 +92,7 @@ ErrorOr<size_t> CertificateStoreModel::add(Vector<Certificate> const& certificat
ErrorOr<void> CertificateStoreWidget::import_pem()
{
auto fsac_result = FileSystemAccessClient::Client::the().open_file(window(), "Choose PEM to import...");
auto fsac_result = FileSystemAccessClient::Client::the().open_file(window(), "Import");
if (fsac_result.is_error())
return {};

View file

@ -37,7 +37,7 @@ CharacterMapWidget::CharacterMapWidget()
m_statusbar = find_descendant_of_type_named<GUI::Statusbar>("statusbar");
m_unicode_block_listview = find_descendant_of_type_named<GUI::ListView>("unicode_block_listview");
m_choose_font_action = GUI::Action::create("Choose Font...", Gfx::Bitmap::load_from_file("/res/icons/16x16/app-font-editor.png"sv).release_value_but_fixme_should_propagate_errors(), [&](auto&) {
m_choose_font_action = GUI::Action::create("Change &Font...", Gfx::Bitmap::load_from_file("/res/icons/16x16/app-font-editor.png"sv).release_value_but_fixme_should_propagate_errors(), [&](auto&) {
auto font_picker = GUI::FontPicker::construct(window(), &font(), false);
if (font_picker->exec() == GUI::Dialog::ExecResult::OK) {
auto& font = *font_picker->font();
@ -58,7 +58,7 @@ CharacterMapWidget::CharacterMapWidget()
});
m_copy_selection_action->set_status_tip("Copy the highlighted characters to the clipboard");
m_previous_glyph_action = GUI::Action::create("Previous character", { Mod_Alt, Key_Left }, Gfx::Bitmap::load_from_file("/res/icons/16x16/go-back.png"sv).release_value_but_fixme_should_propagate_errors(), [&](auto&) {
m_previous_glyph_action = GUI::Action::create("&Previous Glyph", { Mod_Alt, Key_Left }, Gfx::Bitmap::load_from_file("/res/icons/16x16/go-back.png"sv).release_value_but_fixme_should_propagate_errors(), [&](auto&) {
m_glyph_map->select_previous_existing_glyph();
});
m_previous_glyph_action->set_status_tip("Seek the previous visible glyph");
@ -68,9 +68,9 @@ CharacterMapWidget::CharacterMapWidget()
});
m_next_glyph_action->set_status_tip("Seek the next visible glyph");
m_go_to_glyph_action = GUI::Action::create("Go to glyph...", { Mod_Ctrl, Key_G }, Gfx::Bitmap::load_from_file("/res/icons/16x16/go-to.png"sv).release_value_but_fixme_should_propagate_errors(), [&](auto&) {
m_go_to_glyph_action = GUI::Action::create("&Go to Glyph...", { Mod_Ctrl, Key_G }, Gfx::Bitmap::load_from_file("/res/icons/16x16/go-to.png"sv).release_value_but_fixme_should_propagate_errors(), [&](auto&) {
String input;
if (GUI::InputBox::show(window(), input, "Hexadecimal:"sv, "Go to glyph"sv, GUI::InputType::NonemptyText) == GUI::InputBox::ExecResult::OK) {
if (GUI::InputBox::show(window(), input, "Hexadecimal:"sv, "Go to Glyph"sv, GUI::InputType::NonemptyText) == GUI::InputBox::ExecResult::OK) {
auto maybe_code_point = AK::StringUtils::convert_to_uint_from_hex(input);
if (!maybe_code_point.has_value())
return;
@ -83,7 +83,7 @@ CharacterMapWidget::CharacterMapWidget()
});
m_go_to_glyph_action->set_status_tip("Go to the specified code point");
m_find_glyphs_action = GUI::Action::create("&Find glyphs...", { Mod_Ctrl, Key_F }, Gfx::Bitmap::load_from_file("/res/icons/16x16/find.png"sv).release_value_but_fixme_should_propagate_errors(), [&](auto&) {
m_find_glyphs_action = GUI::Action::create("&Find Glyphs...", { Mod_Ctrl, Key_F }, Gfx::Bitmap::load_from_file("/res/icons/16x16/find.png"sv).release_value_but_fixme_should_propagate_errors(), [&](auto&) {
if (m_find_window.is_null()) {
m_find_window = GUI::Window::construct(window());
auto search_widget = m_find_window->set_main_widget<CharacterSearchWidget>().release_value_but_fixme_should_propagate_errors();
@ -92,7 +92,7 @@ CharacterMapWidget::CharacterMapWidget()
m_glyph_map->scroll_to_glyph(code_point);
};
m_find_window->set_icon(GUI::Icon::try_create_default_icon("find"sv).value().bitmap_for_size(16));
m_find_window->set_title("Find a character");
m_find_window->set_title("Find a Character");
m_find_window->resize(300, 400);
m_find_window->set_window_mode(GUI::WindowMode::Modeless);
}

View file

@ -6,7 +6,7 @@
}
@GUI::GroupBox {
title: "Time Format"
title: "Time format"
shrink_to_fit: false
fixed_height: 240
layout: @GUI::VerticalBoxLayout {

View file

@ -6,7 +6,7 @@
}
@GUI::GroupBox {
title: "Time Zone Settings"
title: "Time zone settings"
layout: @GUI::VerticalBoxLayout {
margins: [16, 8, 8]
spacing: 14
@ -23,7 +23,7 @@
}
@GUI::Label {
text: "Time Zone:"
text: "Time zone:"
fixed_width: 80
name: "time_zone_label"
text_alignment: "CenterLeft"

View file

@ -101,7 +101,7 @@ ErrorOr<void> BackgroundSettingsWidget::create_frame()
auto& button = *find_descendant_of_type_named<GUI::Button>("wallpaper_open_button");
button.on_click = [this](auto) {
auto response = FileSystemAccessClient::Client::the().open_file(window(), "Select wallpaper"sv, "/res/wallpapers"sv, Core::File::OpenMode::Read, { { GUI::FileTypeFilter::image_files(), GUI::FileTypeFilter::all_files() } });
auto response = FileSystemAccessClient::Client::the().open_file(window(), "Select Wallpaper"sv, "/res/wallpapers"sv, Core::File::OpenMode::Read, { { GUI::FileTypeFilter::image_files(), GUI::FileTypeFilter::all_files() } });
if (response.is_error())
return;
m_wallpaper_view->selection().clear();
@ -123,7 +123,7 @@ ErrorOr<void> BackgroundSettingsWidget::create_frame()
m_color_input = *find_descendant_of_type_named<GUI::ColorInput>("color_input");
m_color_input->set_color_has_alpha_channel(false);
m_color_input->set_color_picker_title("Select color for desktop");
m_color_input->set_color_picker_title("Select Desktop Color");
bool first_color_change = true;
m_color_input->on_change = [this, first_color_change]() mutable {
m_monitor_widget->set_background_color(m_color_input->color());

View file

@ -130,9 +130,9 @@ ErrorOr<void> EffectsSettingsWidget::load_settings()
m_system_effects = { effects, geometry, tile_window };
static constexpr Array geometry_list = {
"On Move and Resize"sv,
"On Move only"sv,
"On Resize only"sv,
"On move and resize"sv,
"On move only"sv,
"On resize only"sv,
"Never"sv
};
for (size_t i = 0; i < geometry_list.size(); ++i)

View file

@ -35,7 +35,7 @@
layout: @GUI::VerticalBoxLayout {
margins: [14, 14, 4]
}
title: "Screen Settings"
title: "Screen settings"
@GUI::Widget {
preferred_height: "fit"

View file

@ -251,7 +251,7 @@ void MonitorSettingsWidget::apply_settings()
auto seconds_until_revert = 10;
auto box_text = [this, &seconds_until_revert]() -> ErrorOr<String> {
auto output = String::formatted("Do you want to keep the new settings? They will be reverted after {} {}.",
auto output = String::formatted("Do you want to keep the new screen layout?\nReverting in {} {}.",
seconds_until_revert, seconds_until_revert == 1 ? "second" : "seconds");
if (output.is_error()) {
GUI::MessageBox::show_error(window(), "Unable to apply changes"sv);
@ -265,7 +265,7 @@ void MonitorSettingsWidget::apply_settings()
return;
auto current_box_text = current_box_text_or_error.release_value();
auto box = GUI::MessageBox::create(window(), current_box_text, "Apply new screen layout"sv,
auto box = GUI::MessageBox::create(window(), current_box_text, "Confirm Settings"sv,
GUI::MessageBox::Type::Question, GUI::MessageBox::InputType::YesNo)
.release_value_but_fixme_should_propagate_errors();
box->set_icon(window()->icon());

View file

@ -8,7 +8,7 @@
layout: @GUI::VerticalBoxLayout {
margins: [14, 14, 4]
}
title: "Window Theme"
title: "Window theme"
fixed_height: 294
@GUI::Frame {
@ -39,7 +39,7 @@
}
@GUI::GroupBox {
title: "Color Scheme"
title: "Color scheme"
preferred_height: "fit"
layout: @GUI::VerticalBoxLayout {
margins: [14, 14, 14]
@ -60,7 +60,7 @@
layout: @GUI::VerticalBoxLayout {
margins: [14, 14, 4]
}
title: "Cursor Theme"
title: "Cursor theme"
shrink_to_fit: true
@GUI::Button {

View file

@ -569,7 +569,7 @@ void DirectoryView::setup_actions()
m_mkdir_action = GUI::Action::create("&New Directory...", { Mod_Ctrl | Mod_Shift, Key_N }, Gfx::Bitmap::load_from_file("/res/icons/16x16/mkdir.png"sv).release_value_but_fixme_should_propagate_errors(), [&](GUI::Action const&) {
String value;
auto icon = Gfx::Bitmap::load_from_file("/res/icons/32x32/filetype-folder.png"sv).release_value_but_fixme_should_propagate_errors();
if (GUI::InputBox::show(window(), value, "Enter a name:"sv, "New directory"sv, GUI::InputType::NonemptyText, {}, move(icon)) == GUI::InputBox::ExecResult::OK) {
if (GUI::InputBox::show(window(), value, "Enter a name:"sv, "New Directory"sv, GUI::InputType::NonemptyText, {}, move(icon)) == GUI::InputBox::ExecResult::OK) {
auto new_dir_path = LexicalPath::canonicalized_path(DeprecatedString::formatted("{}/{}", path(), value));
int rc = mkdir(new_dir_path.characters(), 0777);
if (rc < 0) {
@ -582,7 +582,7 @@ void DirectoryView::setup_actions()
m_touch_action = GUI::Action::create("New &File...", { Mod_Ctrl | Mod_Shift, Key_F }, Gfx::Bitmap::load_from_file("/res/icons/16x16/new.png"sv).release_value_but_fixme_should_propagate_errors(), [&](GUI::Action const&) {
String value;
auto icon = Gfx::Bitmap::load_from_file("/res/icons/32x32/filetype-unknown.png"sv).release_value_but_fixme_should_propagate_errors();
if (GUI::InputBox::show(window(), value, "Enter a name:"sv, "New file"sv, GUI::InputType::NonemptyText, {}, move(icon)) == GUI::InputBox::ExecResult::OK) {
if (GUI::InputBox::show(window(), value, "Enter a name:"sv, "New File"sv, GUI::InputType::NonemptyText, {}, move(icon)) == GUI::InputBox::ExecResult::OK) {
auto new_file_path = LexicalPath::canonicalized_path(DeprecatedString::formatted("{}/{}", path(), value));
struct stat st;
int rc = stat(new_file_path.characters(), &st);

View file

@ -23,7 +23,7 @@ void delete_paths(Vector<DeprecatedString> const& paths, bool should_confirm, GU
{
DeprecatedString message;
if (paths.size() == 1) {
message = DeprecatedString::formatted("Are you sure you want to delete {}?", LexicalPath::basename(paths[0]));
message = DeprecatedString::formatted("Are you sure you want to delete \"{}\"?", LexicalPath::basename(paths[0]));
} else {
message = DeprecatedString::formatted("Are you sure you want to delete {} files?", paths.size());
}
@ -31,7 +31,7 @@ void delete_paths(Vector<DeprecatedString> const& paths, bool should_confirm, GU
if (should_confirm) {
auto result = GUI::MessageBox::show(parent_window,
message,
"Confirm deletion"sv,
"Confirm Deletion"sv,
GUI::MessageBox::Type::Warning,
GUI::MessageBox::InputType::OKCancel);
if (result == GUI::MessageBox::ExecResult::Cancel)

View file

@ -265,7 +265,7 @@ ErrorOr<void> MainWidget::create_actions()
Config::write_bool("FontEditor"sv, "GlyphMap"sv, "HighlightModifications"sv, action.is_checked());
});
m_highlight_modifications_action->set_checked(highlight_modifications);
m_highlight_modifications_action->set_status_tip("Show or hide highlights on modified glyphs. (Green = New, Blue = Modified, Red = Deleted)");
m_highlight_modifications_action->set_status_tip("Show or hide highlights on modified glyphs");
bool show_system_emoji = Config::read_bool("FontEditor"sv, "GlyphMap"sv, "ShowSystemEmoji"sv, true);
m_glyph_map_widget->set_show_system_emoji(show_system_emoji);
@ -278,7 +278,7 @@ ErrorOr<void> MainWidget::create_actions()
m_go_to_glyph_action = GUI::Action::create("&Go to Glyph...", { Mod_Ctrl, Key_G }, g_resources.go_to_glyph, [this](auto&) {
String input;
auto result = GUI::InputBox::try_show(window(), input, {}, "Go to glyph"sv, GUI::InputType::NonemptyText, "Hexadecimal"sv);
auto result = GUI::InputBox::try_show(window(), input, {}, "Go to Glyph"sv, GUI::InputType::NonemptyText, "Hexadecimal"sv);
if (!result.is_error() && result.value() == GUI::InputBox::ExecResult::OK) {
auto maybe_code_point = AK::StringUtils::convert_to_uint_from_hex(input);
if (!maybe_code_point.has_value())

View file

@ -11,7 +11,7 @@
}
@GUI::GroupBox {
title: "Background Color"
title: "Background color"
max_height: "shrink"
layout: @GUI::VerticalBoxLayout {
margins: [8]
@ -24,7 +24,7 @@
}
@GUI::GroupBox {
title: "Card Back"
title: "Card back"
layout: @GUI::VerticalBoxLayout {
margins: [8]
}

View file

@ -23,7 +23,7 @@
}
@GUI::Label {
text: "Piece Set:"
text: "Piece set:"
text_alignment: "CenterLeft"
}
@ -39,7 +39,7 @@
}
@GUI::Label {
text: "Board Theme:"
text: "Board theme:"
text_alignment: "CenterLeft"
}

View file

@ -13,7 +13,7 @@
fixed_height: 22
@GUI::Label {
text: "Value to find"
text: "Value to find:"
fixed_width: 80
text_alignment: "CenterLeft"
}

View file

@ -98,9 +98,9 @@ HexEditorWidget::HexEditorWidget()
m_editor->update();
};
m_new_action = GUI::Action::create("New", { Mod_Ctrl, Key_N }, Gfx::Bitmap::load_from_file("/res/icons/16x16/new.png"sv).release_value_but_fixme_should_propagate_errors(), [this](const GUI::Action&) {
m_new_action = GUI::Action::create("New...", { Mod_Ctrl, Key_N }, Gfx::Bitmap::load_from_file("/res/icons/16x16/new.png"sv).release_value_but_fixme_should_propagate_errors(), [this](const GUI::Action&) {
String value;
if (request_close() && GUI::InputBox::show(window(), value, "Enter new file size:"sv, "New file size"sv, GUI::InputType::NonemptyText) == GUI::InputBox::ExecResult::OK) {
if (request_close() && GUI::InputBox::show(window(), value, "Enter a size:"sv, "New File"sv, GUI::InputType::NonemptyText) == GUI::InputBox::ExecResult::OK) {
auto file_size = AK::StringUtils::convert_to_uint(value);
if (!file_size.has_value()) {
GUI::MessageBox::show(window(), "Invalid file size entered."sv, "Error"sv, GUI::MessageBox::Type::Error);
@ -166,7 +166,7 @@ HexEditorWidget::HexEditorWidget()
});
m_redo_action->set_enabled(false);
m_find_action = GUI::Action::create("&Find", { Mod_Ctrl, Key_F }, Gfx::Bitmap::load_from_file("/res/icons/16x16/find.png"sv).release_value_but_fixme_should_propagate_errors(), [&](const GUI::Action&) {
m_find_action = GUI::Action::create("&Find...", { Mod_Ctrl, Key_F }, Gfx::Bitmap::load_from_file("/res/icons/16x16/find.png"sv).release_value_but_fixme_should_propagate_errors(), [&](const GUI::Action&) {
auto old_buffer = m_search_buffer;
bool find_all = false;
if (FindDialog::show(window(), m_search_text, m_search_buffer, find_all) == GUI::InputBox::ExecResult::OK) {
@ -176,11 +176,11 @@ HexEditorWidget::HexEditorWidget()
m_search_results->update();
if (matches.is_empty()) {
GUI::MessageBox::show(window(), DeprecatedString::formatted("Pattern \"{}\" not found in this file", m_search_text), "Not found"sv, GUI::MessageBox::Type::Warning);
GUI::MessageBox::show(window(), DeprecatedString::formatted("Pattern \"{}\" not found in this file", m_search_text), "Not Found"sv, GUI::MessageBox::Type::Warning);
return;
}
GUI::MessageBox::show(window(), DeprecatedString::formatted("Found {} matches for \"{}\" in this file", matches.size(), m_search_text), DeprecatedString::formatted("{} matches", matches.size()), GUI::MessageBox::Type::Warning);
GUI::MessageBox::show(window(), DeprecatedString::formatted("Found {} matches for \"{}\" in this file", matches.size(), m_search_text), DeprecatedString::formatted("{} Matches", matches.size()), GUI::MessageBox::Type::Warning);
set_search_results_visible(true);
} else {
bool same_buffers = false;
@ -192,7 +192,7 @@ HexEditorWidget::HexEditorWidget()
auto result = m_editor->find_and_highlight(m_search_buffer, same_buffers ? last_found_index() : 0);
if (!result.has_value()) {
GUI::MessageBox::show(window(), DeprecatedString::formatted("Pattern \"{}\" not found in this file", m_search_text), "Not found"sv, GUI::MessageBox::Type::Warning);
GUI::MessageBox::show(window(), DeprecatedString::formatted("Pattern \"{}\" not found in this file", m_search_text), "Not Found"sv, GUI::MessageBox::Type::Warning);
return;
}
@ -203,7 +203,7 @@ HexEditorWidget::HexEditorWidget()
}
});
m_goto_offset_action = GUI::Action::create("&Go to Offset ...", { Mod_Ctrl, Key_G }, Gfx::Bitmap::load_from_file("/res/icons/16x16/go-to.png"sv).release_value_but_fixme_should_propagate_errors(), [this](const GUI::Action&) {
m_goto_offset_action = GUI::Action::create("&Go to Offset...", { Mod_Ctrl, Key_G }, Gfx::Bitmap::load_from_file("/res/icons/16x16/go-to.png"sv).release_value_but_fixme_should_propagate_errors(), [this](const GUI::Action&) {
int new_offset;
auto result = GoToOffsetDialog::show(
window(),
@ -443,13 +443,13 @@ ErrorOr<void> HexEditorWidget::initialize_menubar(GUI::Window& window)
TRY(edit_menu->try_add_action(*m_find_action));
TRY(edit_menu->try_add_action(GUI::Action::create("Find &Next", { Mod_None, Key_F3 }, TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/find-next.png"sv)), [&](const GUI::Action&) {
if (m_search_text.is_empty() || m_search_buffer.is_empty()) {
GUI::MessageBox::show(&window, "Nothing to search for"sv, "Not found"sv, GUI::MessageBox::Type::Warning);
GUI::MessageBox::show(&window, "Nothing to search for"sv, "Not Found"sv, GUI::MessageBox::Type::Warning);
return;
}
auto result = m_editor->find_and_highlight(m_search_buffer, last_found_index());
if (!result.has_value()) {
GUI::MessageBox::show(&window, DeprecatedString::formatted("No more matches for \"{}\" found in this file", m_search_text), "Not found"sv, GUI::MessageBox::Type::Warning);
GUI::MessageBox::show(&window, DeprecatedString::formatted("No more matches for \"{}\" found in this file", m_search_text), "Not Found"sv, GUI::MessageBox::Type::Warning);
return;
}
m_editor->update();
@ -463,7 +463,7 @@ ErrorOr<void> HexEditorWidget::initialize_menubar(GUI::Window& window)
m_search_results->update();
if (matches.is_empty()) {
GUI::MessageBox::show(&window, "No strings found in this file"sv, "Not found"sv, GUI::MessageBox::Type::Warning);
GUI::MessageBox::show(&window, "No strings found in this file"sv, "Not Found"sv, GUI::MessageBox::Type::Warning);
return;
}

View file

@ -137,7 +137,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
auto msgbox_result = GUI::MessageBox::show(window,
DeprecatedString::formatted("Are you sure you want to delete {}?", path),
"Confirm deletion"sv,
"Confirm Deletion"sv,
GUI::MessageBox::Type::Warning,
GUI::MessageBox::InputType::OKCancel);
@ -148,7 +148,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
if (unlinked_or_error.is_error()) {
GUI::MessageBox::show(window,
DeprecatedString::formatted("unlink({}) failed: {}", path, unlinked_or_error.error()),
"Delete failed"sv,
"Delete Failed"sv,
GUI::MessageBox::Type::Error);
return;
@ -238,10 +238,11 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
},
window);
auto hide_show_toolbar_action = GUI::Action::create("Hide/Show &Toolbar", { Mod_Ctrl, Key_T },
[&](auto&) {
toolbar_container->set_visible(!toolbar_container->is_visible());
auto hide_show_toolbar_action = GUI::Action::create_checkable("&Toolbar", { Mod_Ctrl, Key_T },
[&](auto& action) {
toolbar_container->set_visible(action.is_checked());
});
hide_show_toolbar_action->set_checked(true);
auto copy_action = GUI::CommonActions::make_copy_action([&](auto&) {
if (widget->bitmap())

View file

@ -79,7 +79,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
app->quit();
});
auto auto_modifier_action = GUI::Action::create("Auto Modifier", [&](auto& act) {
auto auto_modifier_action = GUI::Action::create("Auto-Modifier", [&](auto& act) {
keyboard_mapper_widget->set_automatic_modifier(act.is_checked());
});
auto_modifier_action->set_status_tip("Toggle automatic modifier");

View file

@ -40,18 +40,18 @@
@GUI::Button {
name: "activate_keymap_button"
text: "Activate keymap"
text: "Activate Keymap"
enabled: false
}
@GUI::Button {
name: "add_keymap_button"
text: "Add keymap"
text: "Add Keymap..."
}
@GUI::Button {
name: "remove_keymap_button"
text: "Remove keymap"
text: "Remove Keymap"
enabled: false
}
}
@ -59,7 +59,7 @@
}
@GUI::GroupBox {
title: "Test Input"
title: "Test input"
layout: @GUI::HorizontalBoxLayout {
margins: [16, 8, 8]
spacing: 16

View file

@ -5,7 +5,7 @@
}
@GUI::GroupBox {
title: "Server Settings"
title: "Server settings"
fixed_height: 170
layout: @GUI::VerticalBoxLayout {
margins: [6]
@ -39,7 +39,7 @@
}
@GUI::Label {
text: "Server Address:"
text: "Server address:"
fixed_width: 80
name: "server_label"
text_alignment: "CenterLeft"
@ -60,7 +60,7 @@
}
@GUI::Label {
text: "Server Port:"
text: "Server port:"
fixed_width: 80
name: "port_label"
text_alignment: "CenterLeft"
@ -88,7 +88,7 @@
}
@GUI::GroupBox {
title: "User Settings"
title: "User settings"
fixed_height: 110
layout: @GUI::VerticalBoxLayout {
margins: [6]
@ -123,7 +123,7 @@
@GUI::Label {
autosize: true
text: "Email Address:"
text: "Email address:"
fixed_width: 80
text_alignment: "CenterLeft"
}

View file

@ -18,7 +18,7 @@
}
@GUI::GroupBox {
title: "Highlight Color"
title: "Highlight color"
preferred_height: "opportunistic_grow"
layout: @GUI::VerticalBoxLayout {
margins: [6]
@ -36,7 +36,7 @@
}
@GUI::GroupBox {
title: "Highlight Opacity"
title: "Highlight opacity"
preferred_height: "opportunistic_grow"
layout: @GUI::VerticalBoxLayout {
margins: [6]
@ -70,7 +70,7 @@
}
@GUI::GroupBox {
title: "Highlight Size"
title: "Highlight size"
preferred_height: "opportunistic_grow"
layout: @GUI::VerticalBoxLayout {
margins: [6]

View file

@ -5,7 +5,7 @@
}
@GUI::GroupBox {
title: "Cursor Speed"
title: "Cursor speed"
fixed_height: 106
layout: @GUI::VerticalBoxLayout {
margins: [6]
@ -53,7 +53,7 @@
}
@GUI::GroupBox {
title: "Scroll Wheel"
title: "Scroll wheel"
fixed_height: 106
layout: @GUI::VerticalBoxLayout {
margins: [6]
@ -114,7 +114,7 @@
}
@GUI::GroupBox {
title: "Double-click Speed"
title: "Double-click speed"
fixed_height: 106
layout: @GUI::VerticalBoxLayout {
margins: [6]
@ -163,7 +163,7 @@
}
@GUI::GroupBox {
title: "Button Configuration"
title: "Button configuration"
fixed_height: 68
layout: @GUI::VerticalBoxLayout {
margins: [16, 8, 8]

View file

@ -5,7 +5,7 @@
}
@GUI::GroupBox {
title: "Available Cursor Themes"
title: "Available cursor themes"
layout: @GUI::VerticalBoxLayout {
margins: [6]
spacing: 4

View file

@ -51,7 +51,7 @@
preferred_height: 30
@GUI::Label {
text: "IP Address:"
text: "IP address:"
fixed_width: 100
text_alignment: "CenterLeft"
}

View file

@ -25,7 +25,7 @@ ErrorOr<void> ExportProgressWindow::initialize_fallibles()
set_resizable(false);
set_closeable(false);
set_title("Rendering audio");
set_title("Rendering Audio");
set_icon(GUI::Icon::default_icon("app-piano"sv).bitmap_for_size(16));
m_progress_bar = *main_widget->find_descendant_of_type_named<GUI::HorizontalProgressbar>("progress_bar");

View file

@ -59,7 +59,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
main_widget_updater->start();
auto file_menu = TRY(window->try_add_menu("&File"_short_string));
TRY(file_menu->try_add_action(GUI::Action::create("Export", { Mod_Ctrl, Key_E }, TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/file-export.png"sv)), [&](const GUI::Action&) {
TRY(file_menu->try_add_action(GUI::Action::create("Export...", { Mod_Ctrl, Key_E }, TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/file-export.png"sv)), [&](const GUI::Action&) {
save_path = GUI::FilePicker::get_save_filepath(window, "Untitled", "wav");
if (!save_path.has_value())
return;

View file

@ -23,7 +23,7 @@ namespace PixelPaint {
CreateNewImageDialog::CreateNewImageDialog(GUI::Window* parent_window)
: Dialog(parent_window)
{
set_title("Create new image");
set_title("Create New Image");
set_icon(parent_window->icon());
resize(200, 220);

View file

@ -18,7 +18,7 @@ EditGuideDialog::EditGuideDialog(GUI::Window* parent_window, DeprecatedString co
, m_offset(offset)
, m_orientation(orientation)
{
set_title("Create new Guide");
set_title("Create New Guide");
set_icon(parent_window->icon());
resize(200, 130);
set_resizable(false);

View file

@ -224,7 +224,7 @@ ErrorOr<void> MainWidget::initialize_menubar(GUI::Window& window)
TRY(m_export_submenu->try_add_action(
GUI::Action::create(
"As &BMP", [&](auto&) {
"As &BMP...", [&](auto&) {
auto* editor = current_image_editor();
VERIFY(editor);
auto response = FileSystemAccessClient::Client::the().save_file(&window, editor->title().to_deprecated_string(), "bmp");
@ -238,7 +238,7 @@ ErrorOr<void> MainWidget::initialize_menubar(GUI::Window& window)
TRY(m_export_submenu->try_add_action(
GUI::Action::create(
"As &PNG", [&](auto&) {
"As &PNG...", [&](auto&) {
auto* editor = current_image_editor();
VERIFY(editor);
// TODO: fix bmp on line below?
@ -253,7 +253,7 @@ ErrorOr<void> MainWidget::initialize_menubar(GUI::Window& window)
TRY(m_export_submenu->try_add_action(
GUI::Action::create(
"As &QOI", [&](auto&) {
"As &QOI...", [&](auto&) {
auto* editor = current_image_editor();
VERIFY(editor);
auto response = FileSystemAccessClient::Client::the().save_file(&window, editor->title().to_deprecated_string(), "qoi");
@ -454,7 +454,7 @@ ErrorOr<void> MainWidget::initialize_menubar(GUI::Window& window)
editor->set_secondary_color(Color::White);
})));
TRY(m_edit_menu->try_add_action(GUI::Action::create(
"&Load Color Palette", g_icon_bag.load_color_palette, [&](auto&) {
"&Load Color Palette...", g_icon_bag.load_color_palette, [&](auto&) {
auto response = FileSystemAccessClient::Client::the().open_file(&window, "Load Color Palette");
if (response.is_error())
return;
@ -468,7 +468,7 @@ ErrorOr<void> MainWidget::initialize_menubar(GUI::Window& window)
m_palette_widget->display_color_list(result.value());
})));
TRY(m_edit_menu->try_add_action(GUI::Action::create(
"Sa&ve Color Palette", g_icon_bag.save_color_palette, [&](auto&) {
"Sa&ve Color Palette...", g_icon_bag.save_color_palette, [&](auto&) {
auto response = FileSystemAccessClient::Client::the().save_file(&window, "untitled", "palette");
if (response.is_error())
return;
@ -501,7 +501,7 @@ ErrorOr<void> MainWidget::initialize_menubar(GUI::Window& window)
});
m_add_guide_action = GUI::Action::create(
"&Add Guide", g_icon_bag.add_guide, [&](auto&) {
"&Add Guide...", g_icon_bag.add_guide, [&](auto&) {
auto dialog = PixelPaint::EditGuideDialog::construct(&window);
if (dialog->exec() != GUI::Dialog::ExecResult::OK)
return;

View file

@ -83,7 +83,7 @@ ErrorOr<void> PresenterWidget::initialize_menubar()
update_slides_actions();
}
});
m_present_from_first_slide_action = GUI::Action::create("Present From First &Slide", { KeyCode::Key_F5 }, TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/play.png"sv)), [this](auto&) {
m_present_from_first_slide_action = GUI::Action::create("Present from First &Slide", { KeyCode::Key_F5 }, TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/play.png"sv)), [this](auto&) {
if (m_current_presentation) {
m_current_presentation->go_to_first_slide();
update_web_view();

View file

@ -92,12 +92,12 @@ BarsVisualizationWidget::BarsVisualizationWidget()
, m_logarithmic_spectrum(true)
{
m_context_menu = GUI::Menu::construct();
auto frequency_energy_action = GUI::Action::create_checkable("Adjust frequency energy (for aesthetics)", [&](GUI::Action& action) {
auto frequency_energy_action = GUI::Action::create_checkable("Adjust Frequency Energy", [&](GUI::Action& action) {
m_adjust_frequencies = action.is_checked();
});
frequency_energy_action->set_checked(true);
m_context_menu->add_action(frequency_energy_action);
auto logarithmic_spectrum_action = GUI::Action::create_checkable("Scale spectrum logarithmically", [&](GUI::Action& action) {
auto logarithmic_spectrum_action = GUI::Action::create_checkable("Scale Spectrum Logarithmically", [&](GUI::Action& action) {
m_logarithmic_spectrum = action.is_checked();
});
logarithmic_spectrum_action->set_checked(true);

View file

@ -62,7 +62,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
auto file_menu = TRY(window->try_add_menu("&File"_short_string));
TRY(file_menu->try_add_action(GUI::CommonActions::make_open_action([&](auto&) {
Optional<DeprecatedString> path = GUI::FilePicker::get_open_filepath(window, "Open sound file...");
Optional<DeprecatedString> path = GUI::FilePicker::get_open_filepath(window);
if (path.has_value()) {
player->play_file_path(path.value());
}

View file

@ -388,7 +388,7 @@ SpreadsheetView::SpreadsheetView(Sheet& sheet)
};
m_cell_range_context_menu = GUI::Menu::construct();
m_cell_range_context_menu->add_action(GUI::Action::create("Type and Formatting...", [this](auto&) {
m_cell_range_context_menu->add_action(GUI::Action::create("Format...", [this](auto&) {
Vector<Position> positions;
for (auto& index : m_table_view->selection().indices()) {
Position position { (size_t)index.column(), (size_t)index.row() };

View file

@ -101,14 +101,14 @@ SpreadsheetWidget::SpreadsheetWidget(GUI::Window& parent_window, Vector<NonnullR
VERIFY(sheet_ptr); // How did we get here without a sheet?
auto& sheet = *sheet_ptr;
String new_name = String::from_deprecated_string(sheet.name()).release_value_but_fixme_should_propagate_errors();
if (GUI::InputBox::show(window(), new_name, {}, "Rename sheet"sv, GUI::InputType::NonemptyText, "Name"sv) == GUI::Dialog::ExecResult::OK) {
if (GUI::InputBox::show(window(), new_name, {}, "Rename Sheet"sv, GUI::InputType::NonemptyText, "Name"sv) == GUI::Dialog::ExecResult::OK) {
sheet.set_name(new_name);
sheet.update();
m_tab_widget->set_tab_title(static_cast<GUI::Widget&>(*m_tab_context_menu_sheet_view), new_name);
}
});
m_tab_context_menu->add_action(*m_rename_action);
m_tab_context_menu->add_action(GUI::Action::create("Add new sheet...", Gfx::Bitmap::load_from_file("/res/icons/16x16/new-tab.png"sv).release_value_but_fixme_should_propagate_errors(), [this](auto&) {
m_tab_context_menu->add_action(GUI::Action::create("Add New Sheet...", Gfx::Bitmap::load_from_file("/res/icons/16x16/new-tab.png"sv).release_value_but_fixme_should_propagate_errors(), [this](auto&) {
String name;
auto icon = Gfx::Bitmap::load_from_file("/res/icons/32x32/filetype-spreadsheet.png"sv).release_value_but_fixme_should_propagate_errors();
if (GUI::InputBox::show(window(), name, "Enter a name:"sv, "New sheet"sv, GUI::InputType::NonemptyText, {}, move(icon)) == GUI::Dialog::ExecResult::OK) {
@ -134,7 +134,7 @@ SpreadsheetWidget::SpreadsheetWidget(GUI::Window& parent_window, Vector<NonnullR
load_file(response.value().filename(), response.value().stream());
});
m_import_action = GUI::Action::create("Import sheets...", [&](auto&) {
m_import_action = GUI::Action::create("Import Sheets...", [&](auto&) {
auto response = FileSystemAccessClient::Client::the().open_file(window());
if (response.is_error())
return;

View file

@ -368,17 +368,20 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
if (!should_confirm_close)
return GUI::MessageBox::ExecResult::OK;
Optional<DeprecatedString> close_message;
auto title = "Running Process"sv;
if (tty_has_foreground_process()) {
close_message = "There is still a process running in this terminal. Closing the terminal will kill it.";
close_message = "Close Terminal and kill its foreground process?";
} else {
auto child_process_count = shell_child_process_count();
if (child_process_count > 1)
close_message = DeprecatedString::formatted("There are {} background processes running in this terminal. Closing the terminal may kill them.", child_process_count);
else if (child_process_count == 1)
close_message = "There is a background process running in this terminal. Closing the terminal may kill it.";
if (child_process_count > 1) {
title = "Running Processes"sv;
close_message = DeprecatedString::formatted("Close Terminal and kill its {} background processes?", child_process_count);
} else if (child_process_count == 1) {
close_message = "Close Terminal and kill its background process?";
}
}
if (close_message.has_value())
return GUI::MessageBox::show(window, *close_message, "Close this terminal?"sv, GUI::MessageBox::Type::Warning, GUI::MessageBox::InputType::OKCancel);
return GUI::MessageBox::show(window, *close_message, title, GUI::MessageBox::Type::Warning, GUI::MessageBox::InputType::OKCancel);
return GUI::MessageBox::ExecResult::OK;
};

View file

@ -473,7 +473,7 @@ ErrorOr<void> MainWidget::initialize_menubar(GUI::Window& window)
TRY(view_menu->try_add_separator());
TRY(view_menu->try_add_action(GUI::Action::create("Editor &Font...", TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/app-font-editor.png"sv)),
TRY(view_menu->try_add_action(GUI::Action::create("Change &Font...", TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/app-font-editor.png"sv)),
[&](auto&) {
auto picker = GUI::FontPicker::construct(&window, &m_editor->font(), false);
if (picker->exec() == GUI::Dialog::ExecResult::OK) {

View file

@ -242,7 +242,7 @@ ErrorOr<void> MainWidget::initialize_menubar(GUI::Window& window)
TRY(file_menu->try_add_action(GUI::CommonActions::make_open_action([&](auto&) {
if (request_close() == GUI::Window::CloseRequestDecision::StayOpen)
return;
auto response = FileSystemAccessClient::Client::the().open_file(&window, "Select theme file", "/res/themes"sv);
auto response = FileSystemAccessClient::Client::the().open_file(&window, "Select Theme", "/res/themes"sv);
if (response.is_error())
return;
auto load_from_file_result = load_from_file(response.value().filename(), response.value().release_stream());

View file

@ -384,7 +384,7 @@ ErrorOr<void> VideoPlayerWidget::initialize_menubar(GUI::Window& window)
// File menu
auto file_menu = TRY(window.try_add_menu("&File"_short_string));
TRY(file_menu->try_add_action(GUI::CommonActions::make_open_action([&](auto&) {
auto response = FileSystemAccessClient::Client::the().open_file(&window, "Open video file...");
auto response = FileSystemAccessClient::Client::the().open_file(&window);
if (response.is_error())
return;
@ -408,7 +408,7 @@ ErrorOr<void> VideoPlayerWidget::initialize_menubar(GUI::Window& window)
auto view_menu = TRY(window.try_add_menu("&View"_short_string));
TRY(view_menu->try_add_action(*m_toggle_fullscreen_action));
auto sizing_mode_menu = TRY(view_menu->try_add_submenu(TRY("&Sizing mode"_string)));
auto sizing_mode_menu = TRY(view_menu->try_add_submenu(TRY("&Sizing Mode"_string)));
sizing_mode_menu->set_icon(TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/fit-image-to-view.png"sv)));
m_sizing_mode_group = make<GUI::ActionGroup>();