summaryrefslogtreecommitdiff
path: root/Userland/Applications
diff options
context:
space:
mode:
authorKarol Kosek <krkk@serenityos.org>2023-02-12 11:13:18 +0100
committerLinus Groh <mail@linusgroh.de>2023-02-13 00:45:09 +0000
commitd32b052f22d3b1ffbf009d5de17572f381cd87fa (patch)
tree1c7d13a32501208d6e1594ac38d51d2b21ce6c11 /Userland/Applications
parent61b49daf0acd3b3511521eb8eb494d5c57610b62 (diff)
downloadserenity-d32b052f22d3b1ffbf009d5de17572f381cd87fa.zip
LibGUI+Userland: Add `_deprecated` suffix to AbstractButton::{set_,}text
Diffstat (limited to 'Userland/Applications')
-rw-r--r--Userland/Applications/Assistant/main.cpp6
-rw-r--r--Userland/Applications/Browser/BookmarksBarWidget.cpp4
-rw-r--r--Userland/Applications/Browser/DownloadWidget.cpp2
-rw-r--r--Userland/Applications/HexEditor/FindDialog.cpp2
-rw-r--r--Userland/Applications/KeyboardMapper/KeyButton.cpp6
-rw-r--r--Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp6
-rw-r--r--Userland/Applications/PDFViewer/PDFViewerWidget.cpp4
-rw-r--r--Userland/Applications/PixelPaint/CreateNewImageDialog.cpp2
-rw-r--r--Userland/Applications/PixelPaint/Tools/EraseTool.cpp2
-rw-r--r--Userland/Applications/ThemeEditor/MainWidget.cpp2
10 files changed, 18 insertions, 18 deletions
diff --git a/Userland/Applications/Assistant/main.cpp b/Userland/Applications/Assistant/main.cpp
index 260ff7e754..9a672c40a2 100644
--- a/Userland/Applications/Assistant/main.cpp
+++ b/Userland/Applications/Assistant/main.cpp
@@ -57,7 +57,7 @@ class ResultRow final : public GUI::Button {
if (!m_context_menu) {
m_context_menu = GUI::Menu::construct();
- if (LexicalPath path { text() }; path.is_absolute()) {
+ if (LexicalPath path { text_deprecated() }; path.is_absolute()) {
m_context_menu->add_action(GUI::Action::create("&Show in File Manager", MUST(Gfx::Bitmap::load_from_file("/res/icons/16x16/app-file-manager.png"sv)), [=](auto&) {
Desktop::Launcher::open(URL::create_with_file_scheme(path.dirname(), path.basename()));
}));
@@ -65,7 +65,7 @@ class ResultRow final : public GUI::Button {
}
m_context_menu->add_action(GUI::Action::create("&Copy as Text", MUST(Gfx::Bitmap::load_from_file("/res/icons/16x16/edit-copy.png"sv)), [&](auto&) {
- GUI::Clipboard::the().set_plain_text(text());
+ GUI::Clipboard::the().set_plain_text(text_deprecated());
}));
}
m_context_menu->popup(event.screen_position());
@@ -256,7 +256,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
auto& result = app_state.results[i];
auto& match = results_container.add<Assistant::ResultRow>();
match.set_icon(result.bitmap());
- match.set_text(move(result.title()));
+ match.set_text_deprecated(move(result.title()));
match.set_tooltip(move(result.tooltip()));
match.on_click = [&result](auto) {
result.activate();
diff --git a/Userland/Applications/Browser/BookmarksBarWidget.cpp b/Userland/Applications/Browser/BookmarksBarWidget.cpp
index e3e02a2bd1..48207ee1e0 100644
--- a/Userland/Applications/Browser/BookmarksBarWidget.cpp
+++ b/Userland/Applications/Browser/BookmarksBarWidget.cpp
@@ -205,7 +205,7 @@ void BookmarksBarWidget::model_did_update(unsigned)
m_bookmarks.append(button);
button.set_button_style(Gfx::ButtonStyle::Coolbar);
- button.set_text(title);
+ button.set_text_deprecated(title);
button.set_icon(g_icon_bag.filetype_html);
button.set_fixed_size(font().width(title) + 32, 20);
button.set_relative_rect(rect);
@@ -264,7 +264,7 @@ void BookmarksBarWidget::update_content_size()
for (size_t i = m_last_visible_index; i < m_bookmarks.size(); ++i) {
auto& bookmark = m_bookmarks.at(i);
bookmark.set_visible(false);
- m_additional_menu->add_action(GUI::Action::create(bookmark.text(), g_icon_bag.filetype_html, [&](auto&) { bookmark.on_click(0); }));
+ m_additional_menu->add_action(GUI::Action::create(bookmark.text_deprecated(), g_icon_bag.filetype_html, [&](auto&) { bookmark.on_click(0); }));
}
}
}
diff --git a/Userland/Applications/Browser/DownloadWidget.cpp b/Userland/Applications/Browser/DownloadWidget.cpp
index 9dcdd80322..19a679b148 100644
--- a/Userland/Applications/Browser/DownloadWidget.cpp
+++ b/Userland/Applications/Browser/DownloadWidget.cpp
@@ -153,7 +153,7 @@ void DownloadWidget::did_finish(bool success)
m_browser_image->load_from_file("/res/graphics/download-finished.gif"sv);
window()->set_title("Download finished!");
m_close_button->set_enabled(true);
- m_cancel_button->set_text("Open in Folder");
+ m_cancel_button->set_text_deprecated("Open in Folder");
m_cancel_button->on_click = [this](auto) {
Desktop::Launcher::open(URL::create_with_file_scheme(Core::StandardPaths::downloads_directory(), m_url.basename()));
window()->close();
diff --git a/Userland/Applications/HexEditor/FindDialog.cpp b/Userland/Applications/HexEditor/FindDialog.cpp
index c3204f64b4..739a31dbe2 100644
--- a/Userland/Applications/HexEditor/FindDialog.cpp
+++ b/Userland/Applications/HexEditor/FindDialog.cpp
@@ -112,7 +112,7 @@ FindDialog::FindDialog()
auto action = options[i];
auto& radio = radio_container.add<GUI::RadioButton>();
radio.set_enabled(action.enabled);
- radio.set_text(action.title);
+ radio.set_text_deprecated(action.title);
radio.on_checked = [this, i](auto) {
m_selected_option = options[i].opt;
diff --git a/Userland/Applications/KeyboardMapper/KeyButton.cpp b/Userland/Applications/KeyboardMapper/KeyButton.cpp
index d5417d88d5..c444a3df6b 100644
--- a/Userland/Applications/KeyboardMapper/KeyButton.cpp
+++ b/Userland/Applications/KeyboardMapper/KeyButton.cpp
@@ -38,13 +38,13 @@ void KeyButton::paint_event(GUI::PaintEvent& event)
painter.draw_rect(key_cap_face_border_rect, Color::from_rgb(0x8C7272), false);
painter.fill_rect(key_cap_face_rect, face_color);
- if (text().is_empty() || text().starts_with('\0'))
+ if (text_deprecated().is_empty() || text_deprecated().starts_with('\0'))
return;
- Gfx::IntRect text_rect { 0, 0, static_cast<int>(ceilf(font.width(text()))), font.glyph_height() };
+ Gfx::IntRect text_rect { 0, 0, static_cast<int>(ceilf(font.width(text_deprecated()))), font.glyph_height() };
text_rect.align_within(key_cap_face_rect, Gfx::TextAlignment::Center);
- painter.draw_text(text_rect, text(), font, Gfx::TextAlignment::Center, Color::Black, Gfx::TextElision::Right);
+ painter.draw_text(text_rect, text_deprecated(), font, Gfx::TextAlignment::Center, Color::Black, Gfx::TextElision::Right);
if (is_focused())
painter.draw_rect(text_rect.inflated(6, 4), palette().focus_outline());
}
diff --git a/Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp b/Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp
index 9d97082a3b..85bc04b8ce 100644
--- a/Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp
+++ b/Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp
@@ -52,7 +52,7 @@ void KeyboardMapperWidget::create_frame()
auto& tmp_button = main_widget.add<KeyButton>();
tmp_button.set_relative_rect(rect);
- tmp_button.set_text(keys[i].name);
+ tmp_button.set_text_deprecated(keys[i].name);
tmp_button.set_enabled(keys[i].enabled);
tmp_button.on_click = [this, &tmp_button]() {
@@ -64,7 +64,7 @@ void KeyboardMapperWidget::create_frame()
auto index = keys[i].map_index;
VERIFY(index > 0);
- tmp_button.set_text(value);
+ tmp_button.set_text_deprecated(value);
u32* map = map_from_name(m_current_map_name);
if (value.length() == 0)
@@ -248,7 +248,7 @@ void KeyboardMapperWidget::set_current_map(const DeprecatedString current_map)
StringBuilder sb;
sb.append_code_point(map[index]);
- m_keys.at(k)->set_text(sb.to_deprecated_string());
+ m_keys.at(k)->set_text_deprecated(sb.to_deprecated_string());
}
this->update();
diff --git a/Userland/Applications/PDFViewer/PDFViewerWidget.cpp b/Userland/Applications/PDFViewer/PDFViewerWidget.cpp
index fd4e53b418..a0b72ebbbb 100644
--- a/Userland/Applications/PDFViewer/PDFViewerWidget.cpp
+++ b/Userland/Applications/PDFViewer/PDFViewerWidget.cpp
@@ -340,11 +340,11 @@ void PDFViewerWidget::initialize_toolbar(GUI::Toolbar& toolbar)
toolbar.add_separator();
m_show_clipping_paths = toolbar.add<GUI::CheckBox>();
- m_show_clipping_paths->set_text("Show clipping paths");
+ m_show_clipping_paths->set_text_deprecated("Show clipping paths");
m_show_clipping_paths->set_checked(m_viewer->show_clipping_paths(), GUI::AllowCallback::No);
m_show_clipping_paths->on_checked = [&](auto checked) { m_viewer->set_show_clipping_paths(checked); };
m_show_images = toolbar.add<GUI::CheckBox>();
- m_show_images->set_text("Show images");
+ m_show_images->set_text_deprecated("Show images");
m_show_images->set_checked(m_viewer->show_images(), GUI::AllowCallback::No);
m_show_images->on_checked = [&](auto checked) { m_viewer->set_show_images(checked); };
}
diff --git a/Userland/Applications/PixelPaint/CreateNewImageDialog.cpp b/Userland/Applications/PixelPaint/CreateNewImageDialog.cpp
index ba551d9b08..9fc5d1ae8a 100644
--- a/Userland/Applications/PixelPaint/CreateNewImageDialog.cpp
+++ b/Userland/Applications/PixelPaint/CreateNewImageDialog.cpp
@@ -111,7 +111,7 @@ CreateNewImageDialog::CreateNewImageDialog(GUI::Window* parent_window)
};
auto& set_defaults_checkbox = main_widget->add<GUI::CheckBox>();
- set_defaults_checkbox.set_text("Use these settings as default");
+ set_defaults_checkbox.set_text_deprecated("Use these settings as default");
auto& button_container = main_widget->add<GUI::Widget>();
button_container.set_layout<GUI::HorizontalBoxLayout>();
diff --git a/Userland/Applications/PixelPaint/Tools/EraseTool.cpp b/Userland/Applications/PixelPaint/Tools/EraseTool.cpp
index e6564abd04..0b83e5dd30 100644
--- a/Userland/Applications/PixelPaint/Tools/EraseTool.cpp
+++ b/Userland/Applications/PixelPaint/Tools/EraseTool.cpp
@@ -100,7 +100,7 @@ GUI::Widget* EraseTool::get_properties_widget()
auto& use_secondary_color_checkbox = secondary_color_container.add<GUI::CheckBox>();
use_secondary_color_checkbox.set_checked(m_use_secondary_color);
- use_secondary_color_checkbox.set_text("Use secondary color");
+ use_secondary_color_checkbox.set_text_deprecated("Use secondary color");
use_secondary_color_checkbox.on_checked = [&](bool checked) {
m_use_secondary_color = checked;
};
diff --git a/Userland/Applications/ThemeEditor/MainWidget.cpp b/Userland/Applications/ThemeEditor/MainWidget.cpp
index abb662bde3..65702c6b2a 100644
--- a/Userland/Applications/ThemeEditor/MainWidget.cpp
+++ b/Userland/Applications/ThemeEditor/MainWidget.cpp
@@ -487,7 +487,7 @@ ErrorOr<void> MainWidget::add_property_tab(PropertyTab const& property_tab)
TRY(row_widget->load_from_gml(flag_property_gml));
auto& checkbox = *row_widget->find_descendant_of_type_named<GUI::CheckBox>("checkbox");
- checkbox.set_text(to_string(role));
+ checkbox.set_text_deprecated(to_string(role));
checkbox.on_checked = [&, role](bool checked) {
set_flag(role, checked);
};