1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:57:35 +00:00

LibGUI: Fix missing parent in LinkLabel open action

Fixed a bug where an action was being registered in the global shortcut
scope by mistake.
This commit is contained in:
Humberto Alves 2023-02-22 10:32:59 +00:00 committed by Sam Atkins
parent b19dc8a9b6
commit 2df25f8edf

View file

@ -29,10 +29,12 @@ LinkLabel::LinkLabel(DeprecatedString text)
void LinkLabel::setup_actions()
{
m_open_action = GUI::Action::create("Show in File Manager", {}, Gfx::Bitmap::load_from_file("/res/icons/16x16/app-file-manager.png"sv).release_value_but_fixme_should_propagate_errors(), [&](const GUI::Action&) {
if (on_click)
on_click();
});
m_open_action = GUI::Action::create(
"Show in File Manager", Gfx::Bitmap::load_from_file("/res/icons/16x16/app-file-manager.png"sv).release_value_but_fixme_should_propagate_errors(), [&](const GUI::Action&) {
if (on_click)
on_click();
},
this);
m_copy_action = CommonActions::make_copy_action([this](auto&) { Clipboard::the().set_plain_text(text()); }, this);
}