mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 21:29:06 +00:00
LibGUI: Set correct open action for LinkLabel context menu
Replaces the Open... common action for files with more appropriate Show in File Manager, as the desktop context menu uses
This commit is contained in:
parent
885c17b583
commit
042152b346
Notes:
sideshowbarker
2024-07-18 21:55:05 +09:00
Author: https://github.com/thankyouverycool
Commit: 042152b346
Pull-request: https://github.com/SerenityOS/serenity/pull/5532
Issue: https://github.com/SerenityOS/serenity/issues/5177
1 changed files with 2 additions and 3 deletions
|
@ -49,11 +49,10 @@ LinkLabel::LinkLabel(String text)
|
|||
|
||||
void LinkLabel::setup_actions()
|
||||
{
|
||||
m_open_action = CommonActions::make_open_action([this](auto&) {
|
||||
m_open_action = GUI::Action::create("Show in File Manager", {}, Gfx::Bitmap::load_from_file("/res/icons/16x16/app-file-manager.png"), [&](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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue