LibGfx: Remove try_ prefix from bitmap creation functions

Those don't have any non-try counterpart, so we might as well just omit
it.
This commit is contained in:
Tim Schumacher 2023-01-20 20:06:05 +01:00 committed by Linus Groh
parent 1971bff314
commit 82a152b696
Notes: sideshowbarker 2024-07-17 01:10:58 +09:00
186 changed files with 598 additions and 598 deletions

View file

@ -239,7 +239,7 @@ void PDFViewerWidget::initialize_menubar(GUI::Window& window)
void PDFViewerWidget::initialize_toolbar(GUI::Toolbar& toolbar)
{
auto open_outline_action = GUI::Action::create(
"Toggle &Sidebar", { Mod_Ctrl, Key_S }, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/sidebar.png"sv).release_value_but_fixme_should_propagate_errors(), [&](auto&) {
"Toggle &Sidebar", { Mod_Ctrl, Key_S }, Gfx::Bitmap::load_from_file("/res/icons/16x16/sidebar.png"sv).release_value_but_fixme_should_propagate_errors(), [&](auto&) {
m_sidebar_open = !m_sidebar_open;
m_sidebar->set_visible(m_sidebar_open);
},
@ -250,13 +250,13 @@ void PDFViewerWidget::initialize_toolbar(GUI::Toolbar& toolbar)
toolbar.add_action(*open_outline_action);
toolbar.add_separator();
m_go_to_prev_page_action = GUI::Action::create("Go to &Previous Page", Gfx::Bitmap::try_load_from_file("/res/icons/16x16/go-up.png"sv).release_value_but_fixme_should_propagate_errors(), [&](auto&) {
m_go_to_prev_page_action = GUI::Action::create("Go to &Previous Page", Gfx::Bitmap::load_from_file("/res/icons/16x16/go-up.png"sv).release_value_but_fixme_should_propagate_errors(), [&](auto&) {
VERIFY(m_viewer->current_page() > 0);
m_page_text_box->set_current_number(m_viewer->current_page());
});
m_go_to_prev_page_action->set_enabled(false);
m_go_to_next_page_action = GUI::Action::create("Go to &Next Page", Gfx::Bitmap::try_load_from_file("/res/icons/16x16/go-down.png"sv).release_value_but_fixme_should_propagate_errors(), [&](auto&) {
m_go_to_next_page_action = GUI::Action::create("Go to &Next Page", Gfx::Bitmap::load_from_file("/res/icons/16x16/go-down.png"sv).release_value_but_fixme_should_propagate_errors(), [&](auto&) {
VERIFY(m_viewer->current_page() < m_viewer->document()->get_page_count() - 1);
m_page_text_box->set_current_number(m_viewer->current_page() + 2);
});