mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 09:57:36 +00:00
Userland: Prefer _string
over _short_string
As `_string` can't fail anymore (since 3434412
), there are no real
benefits to use the short variant in most cases.
This commit is contained in:
parent
a5edc9cdfc
commit
3f35ffb648
198 changed files with 684 additions and 684 deletions
|
@ -165,8 +165,8 @@ BookmarksBarWidget::BookmarksBarWidget(DeprecatedString const& bookmarks_file, b
|
|||
this));
|
||||
|
||||
Vector<GUI::JsonArrayModel::FieldSpec> fields;
|
||||
fields.empend("title", "Title"_short_string, Gfx::TextAlignment::CenterLeft);
|
||||
fields.empend("url", "Url"_short_string, Gfx::TextAlignment::CenterRight);
|
||||
fields.empend("title", "Title"_string, Gfx::TextAlignment::CenterLeft);
|
||||
fields.empend("url", "Url"_string, Gfx::TextAlignment::CenterRight);
|
||||
set_model(GUI::JsonArrayModel::create(bookmarks_file, move(fields)));
|
||||
model()->invalidate();
|
||||
}
|
||||
|
|
|
@ -153,7 +153,7 @@ BrowserWindow::BrowserWindow(CookieJar& cookie_jar, URL url, WebView::UseJavaScr
|
|||
|
||||
void BrowserWindow::build_menus()
|
||||
{
|
||||
auto& file_menu = add_menu("&File"_short_string);
|
||||
auto& file_menu = add_menu("&File"_string);
|
||||
file_menu.add_action(WindowActions::the().create_new_tab_action());
|
||||
file_menu.add_action(WindowActions::the().create_new_window_action());
|
||||
|
||||
|
@ -168,11 +168,11 @@ void BrowserWindow::build_menus()
|
|||
GUI::Application::the()->quit();
|
||||
}));
|
||||
|
||||
auto& view_menu = add_menu("&View"_short_string);
|
||||
auto& view_menu = add_menu("&View"_string);
|
||||
view_menu.add_action(WindowActions::the().show_bookmarks_bar_action());
|
||||
view_menu.add_action(WindowActions::the().vertical_tabs_action());
|
||||
view_menu.add_separator();
|
||||
m_zoom_menu = view_menu.add_submenu("&Zoom"_short_string);
|
||||
m_zoom_menu = view_menu.add_submenu("&Zoom"_string);
|
||||
m_zoom_menu->add_action(GUI::CommonActions::make_zoom_in_action(
|
||||
[this](auto&) {
|
||||
auto& tab = active_tab();
|
||||
|
@ -219,7 +219,7 @@ void BrowserWindow::build_menus()
|
|||
m_reload_action = GUI::CommonActions::make_reload_action([this](auto&) { active_tab().reload(); }, this);
|
||||
m_reload_action->set_status_tip("Reload current page"_string);
|
||||
|
||||
auto& go_menu = add_menu("&Go"_short_string);
|
||||
auto& go_menu = add_menu("&Go"_string);
|
||||
go_menu.add_action(*m_go_back_action);
|
||||
go_menu.add_action(*m_go_forward_action);
|
||||
go_menu.add_action(*m_go_home_action);
|
||||
|
@ -340,7 +340,7 @@ void BrowserWindow::build_menus()
|
|||
});
|
||||
settings_menu.add_action(move(open_settings_action));
|
||||
|
||||
auto& debug_menu = add_menu("&Debug"_short_string);
|
||||
auto& debug_menu = add_menu("&Debug"_string);
|
||||
debug_menu.add_action(GUI::Action::create(
|
||||
"Dump &DOM Tree", g_icon_bag.dom_tree, [this](auto&) {
|
||||
active_tab().view().debug_request("dump-dom-tree");
|
||||
|
@ -462,7 +462,7 @@ void BrowserWindow::build_menus()
|
|||
same_origin_policy_action->set_checked(false);
|
||||
debug_menu.add_action(same_origin_policy_action);
|
||||
|
||||
auto& help_menu = add_menu("&Help"_short_string);
|
||||
auto& help_menu = add_menu("&Help"_string);
|
||||
help_menu.add_action(GUI::CommonActions::make_command_palette_action(this));
|
||||
help_menu.add_action(WindowActions::the().about_action());
|
||||
}
|
||||
|
@ -564,7 +564,7 @@ void BrowserWindow::set_window_title_for_tab(Tab const& tab)
|
|||
|
||||
Tab& BrowserWindow::create_new_tab(URL url, Web::HTML::ActivateTab activate)
|
||||
{
|
||||
auto& new_tab = m_tab_widget->add_tab<Browser::Tab>("New tab"_short_string, *this, m_use_javascript_bytecode);
|
||||
auto& new_tab = m_tab_widget->add_tab<Browser::Tab>("New tab"_string, *this, m_use_javascript_bytecode);
|
||||
|
||||
m_tab_widget->set_bar_visible(!is_fullscreen() && m_tab_widget->children().size() > 1);
|
||||
|
||||
|
|
|
@ -38,13 +38,13 @@ ErrorOr<String> CookiesModel::column_name(int column) const
|
|||
{
|
||||
switch (column) {
|
||||
case Column::Domain:
|
||||
return "Domain"_short_string;
|
||||
return "Domain"_string;
|
||||
case Column::Path:
|
||||
return "Path"_short_string;
|
||||
return "Path"_string;
|
||||
case Column::Name:
|
||||
return "Name"_short_string;
|
||||
return "Name"_string;
|
||||
case Column::Value:
|
||||
return "Value"_short_string;
|
||||
return "Value"_string;
|
||||
case Column::ExpiryTime:
|
||||
return "Expiry time"_string;
|
||||
case Column::SameSite:
|
||||
|
|
|
@ -103,7 +103,7 @@ DownloadWidget::DownloadWidget(const URL& url)
|
|||
auto& button_container = add<GUI::Widget>();
|
||||
button_container.set_layout<GUI::HorizontalBoxLayout>();
|
||||
button_container.add_spacer().release_value_but_fixme_should_propagate_errors();
|
||||
m_cancel_button = button_container.add<GUI::Button>("Cancel"_short_string);
|
||||
m_cancel_button = button_container.add<GUI::Button>("Cancel"_string);
|
||||
m_cancel_button->set_fixed_size(100, 22);
|
||||
m_cancel_button->on_click = [this](auto) {
|
||||
bool success = m_download->stop();
|
||||
|
@ -111,7 +111,7 @@ DownloadWidget::DownloadWidget(const URL& url)
|
|||
window()->close();
|
||||
};
|
||||
|
||||
m_close_button = button_container.add<GUI::Button>("OK"_short_string);
|
||||
m_close_button = button_container.add<GUI::Button>("OK"_string);
|
||||
m_close_button->set_enabled(false);
|
||||
m_close_button->set_fixed_size(100, 22);
|
||||
m_close_button->on_click = [this](auto) {
|
||||
|
|
|
@ -38,9 +38,9 @@ ErrorOr<String> HistoryModel::column_name(int column) const
|
|||
{
|
||||
switch (column) {
|
||||
case Column::Title:
|
||||
return "Title"_short_string;
|
||||
return "Title"_string;
|
||||
case Column::URL:
|
||||
return "URL"_short_string;
|
||||
return "URL"_string;
|
||||
default:
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
|
|
@ -84,7 +84,7 @@ InspectorWidget::InspectorWidget()
|
|||
|
||||
auto& top_tab_widget = splitter.add<GUI::TabWidget>();
|
||||
|
||||
auto& dom_tree_container = top_tab_widget.add_tab<GUI::Widget>("DOM"_short_string);
|
||||
auto& dom_tree_container = top_tab_widget.add_tab<GUI::Widget>("DOM"_string);
|
||||
dom_tree_container.set_layout<GUI::VerticalBoxLayout>(4);
|
||||
m_dom_tree_view = dom_tree_container.add<GUI::TreeView>();
|
||||
m_dom_tree_view->on_selection_change = [this] {
|
||||
|
|
|
@ -39,9 +39,9 @@ ErrorOr<String> StorageModel::column_name(int column) const
|
|||
{
|
||||
switch (column) {
|
||||
case Column::Key:
|
||||
return "Key"_short_string;
|
||||
return "Key"_string;
|
||||
case Column::Value:
|
||||
return "Value"_short_string;
|
||||
return "Value"_string;
|
||||
case Column::__Count:
|
||||
return String {};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue