Browse Source

rename property.

Dan Walmsley 5 years ago
parent
commit
8e2d904377

+ 2 - 2
native/Avalonia.Native/src/OSX/menu.h

@@ -16,8 +16,8 @@ class AvnAppMenu;
 
 @interface AvnMenu : NSMenu
 - (id) initWithDelegate: (NSObject<NSMenuDelegate>*) del;
-- (void) setIsReparented: (bool) value;
-- (bool) isReparented;
+- (void) setHasGlobalMenuItem: (bool) value;
+- (bool) hasGlobalMenuItem;
 @end
 
 @interface AvnMenuItem : NSMenuItem

+ 3 - 3
native/Avalonia.Native/src/OSX/menu.mm

@@ -18,12 +18,12 @@
     return self;
 }
 
-- (bool)isReparented
+- (bool)hasGlobalMenuItem
 {
     return _isReparented;
 }
 
-- (void)setIsReparented:(bool)value
+- (void)setHasGlobalMenuItem:(bool)value
 {
     _isReparented = value;
 }
@@ -207,7 +207,7 @@ HRESULT AvnAppMenu::InsertItem(int index, IAvnMenuItem *item)
 {
     @autoreleasepool
     {
-        if([_native isReparented])
+        if([_native hasGlobalMenuItem])
         {
             index++;
         }

+ 2 - 2
native/Avalonia.Native/src/OSX/window.mm

@@ -1195,7 +1195,7 @@ NSArray* AllLoopModes = [NSArray arrayWithObjects: NSDefaultRunLoopMode, NSEvent
             
             [_menu insertItem:appMenuItem atIndex:0];
             
-            [_menu setIsReparented:true];
+            [_menu setHasGlobalMenuItem:true];
         }
         
         [NSApp setMenu:_menu];
@@ -1216,7 +1216,7 @@ NSArray* AllLoopModes = [NSArray arrayWithObjects: NSDefaultRunLoopMode, NSEvent
         
         if(_menu != nullptr)
         {
-            [_menu setIsReparented:false];
+            [_menu setHasGlobalMenuItem:false];
         }
         
         [nativeAppMenu->GetNative() addItem:appMenuItem];