mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 11:17:44 +00:00
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:
parent
1971bff314
commit
82a152b696
186 changed files with 598 additions and 598 deletions
|
@ -26,10 +26,10 @@ NetworkStatisticsWidget::NetworkStatisticsWidget()
|
|||
layout()->set_margins(4);
|
||||
set_fill_with_background_color(true);
|
||||
|
||||
m_network_connected_bitmap = Gfx::Bitmap::try_load_from_file("/res/icons/16x16/network-connected.png"sv).release_value_but_fixme_should_propagate_errors();
|
||||
m_network_disconnected_bitmap = Gfx::Bitmap::try_load_from_file("/res/icons/16x16/network-disconnected.png"sv).release_value_but_fixme_should_propagate_errors();
|
||||
m_network_connected_bitmap = Gfx::Bitmap::load_from_file("/res/icons/16x16/network-connected.png"sv).release_value_but_fixme_should_propagate_errors();
|
||||
m_network_disconnected_bitmap = Gfx::Bitmap::load_from_file("/res/icons/16x16/network-disconnected.png"sv).release_value_but_fixme_should_propagate_errors();
|
||||
|
||||
m_network_link_down_bitmap = Gfx::Bitmap::try_create(m_network_connected_bitmap->format(), m_network_connected_bitmap->size()).release_value_but_fixme_should_propagate_errors();
|
||||
m_network_link_down_bitmap = Gfx::Bitmap::create(m_network_connected_bitmap->format(), m_network_connected_bitmap->size()).release_value_but_fixme_should_propagate_errors();
|
||||
{
|
||||
Gfx::Painter painter(*m_network_link_down_bitmap);
|
||||
painter.blit_filtered(Gfx::IntPoint {}, *m_network_connected_bitmap, m_network_connected_bitmap->rect(), [](Color color) {
|
||||
|
@ -75,7 +75,7 @@ NetworkStatisticsWidget::NetworkStatisticsWidget()
|
|||
m_adapter_table_view->set_model(MUST(GUI::SortingProxyModel::create(*m_adapter_model)));
|
||||
m_adapter_context_menu = MUST(GUI::Menu::try_create());
|
||||
m_adapter_context_menu->add_action(GUI::Action::create(
|
||||
"Open in Network Settings...", MUST(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/network.png"sv)), [this](GUI::Action&) {
|
||||
"Open in Network Settings...", MUST(Gfx::Bitmap::load_from_file("/res/icons/16x16/network.png"sv)), [this](GUI::Action&) {
|
||||
m_adapter_table_view->selection().for_each_index([this](GUI::ModelIndex const& index) {
|
||||
auto adapter_name = index.sibling_at_column(1).data().as_string();
|
||||
GUI::Process::spawn_or_show_error(window(), "/bin/Escalator"sv, Array { "/bin/NetworkSettings", adapter_name.characters() });
|
||||
|
|
|
@ -345,7 +345,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
};
|
||||
|
||||
auto kill_action = GUI::Action::create(
|
||||
"&Kill Process", { Mod_Ctrl, Key_K }, { Key_Delete }, TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/kill.png"sv)), [&](const GUI::Action&) {
|
||||
"&Kill Process", { Mod_Ctrl, Key_K }, { Key_Delete }, TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/kill.png"sv)), [&](const GUI::Action&) {
|
||||
pid_t pid = selected_id(ProcessModel::Column::PID);
|
||||
if (pid == -1)
|
||||
return;
|
||||
|
@ -356,7 +356,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
&process_table_view);
|
||||
|
||||
auto stop_action = GUI::Action::create(
|
||||
"&Stop Process", { Mod_Ctrl, Key_S }, TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/stop-hand.png"sv)), [&](const GUI::Action&) {
|
||||
"&Stop Process", { Mod_Ctrl, Key_S }, TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/stop-hand.png"sv)), [&](const GUI::Action&) {
|
||||
pid_t pid = selected_id(ProcessModel::Column::PID);
|
||||
if (pid == -1)
|
||||
return;
|
||||
|
@ -367,7 +367,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
&process_table_view);
|
||||
|
||||
auto continue_action = GUI::Action::create(
|
||||
"&Continue Process", { Mod_Ctrl, Key_C }, TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/continue.png"sv)), [&](const GUI::Action&) {
|
||||
"&Continue Process", { Mod_Ctrl, Key_C }, TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/continue.png"sv)), [&](const GUI::Action&) {
|
||||
pid_t pid = selected_id(ProcessModel::Column::PID);
|
||||
if (pid != -1)
|
||||
kill(pid, SIGCONT);
|
||||
|
@ -376,7 +376,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
auto profile_action = GUI::Action::create(
|
||||
"&Profile Process", { Mod_Ctrl, Key_P },
|
||||
TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/app-profiler.png"sv)), [&](auto&) {
|
||||
TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/app-profiler.png"sv)), [&](auto&) {
|
||||
pid_t pid = selected_id(ProcessModel::Column::PID);
|
||||
if (pid == -1)
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue