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
commit 2df25f8edf
Notes: sideshowbarker 2024-07-16 23:51:08 +09:00

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);
}