瀏覽代碼

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
thankyouverycool 4 年之前
父節點
當前提交
042152b346
共有 1 個文件被更改,包括 2 次插入3 次删除
  1. 2 3
      Userland/Libraries/LibGUI/LinkLabel.cpp

+ 2 - 3
Userland/Libraries/LibGUI/LinkLabel.cpp

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