fix: recentDocuments on macOS not working (#41992)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
This commit is contained in:
parent
9b25f82930
commit
da26750352
2 changed files with 4 additions and 2 deletions
|
@ -26,8 +26,6 @@ class ElectronMenuModel;
|
||||||
@protected
|
@protected
|
||||||
base::WeakPtr<electron::ElectronMenuModel> model_;
|
base::WeakPtr<electron::ElectronMenuModel> model_;
|
||||||
NSMenu* __strong menu_;
|
NSMenu* __strong menu_;
|
||||||
NSMenuItem* __strong recentDocumentsMenuItem_;
|
|
||||||
NSMenu* __strong recentDocumentsMenuSwap_;
|
|
||||||
BOOL isMenuOpen_;
|
BOOL isMenuOpen_;
|
||||||
BOOL useDefaultAccelerator_;
|
BOOL useDefaultAccelerator_;
|
||||||
base::OnceClosure closeCallback;
|
base::OnceClosure closeCallback;
|
||||||
|
|
|
@ -31,10 +31,14 @@ using SharingItem = electron::ElectronMenuModel::SharingItem;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
static NSMenuItem* __strong recentDocumentsMenuItem_;
|
||||||
|
static NSMenu* __strong recentDocumentsMenuSwap_;
|
||||||
|
|
||||||
struct Role {
|
struct Role {
|
||||||
SEL selector;
|
SEL selector;
|
||||||
const char* role;
|
const char* role;
|
||||||
};
|
};
|
||||||
|
|
||||||
Role kRolesMap[] = {
|
Role kRolesMap[] = {
|
||||||
{@selector(orderFrontStandardAboutPanel:), "about"},
|
{@selector(orderFrontStandardAboutPanel:), "about"},
|
||||||
{@selector(hide:), "hide"},
|
{@selector(hide:), "hide"},
|
||||||
|
|
Loading…
Reference in a new issue