mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 10:01:14 +00:00
* Source/GSXibLoader.m:
Added NSMenu (XibCompatibility) category with method: _isMainMenu Added NSMenu (XibCompatibility) category implementation. Modified setting main menu in awake:inContainer:withContext: Fixes bug #36427 Committed by: gcasa git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@35159 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
82a110d152
commit
f8c5c4673d
3 changed files with 28 additions and 4 deletions
|
@ -1,3 +1,12 @@
|
|||
2012-05-21 Marcian Lytwyn <Marcian.Lytwyn@Advcsi.com>
|
||||
|
||||
* Source/GSXibLoader.m:
|
||||
Added NSMenu (XibCompatibility) category with method: _isMainMenu
|
||||
Added NSMenu (XibCompatibility) category implementation.
|
||||
Modified setting main menu in awake:inContainer:withContext:
|
||||
Fixes bug #36427
|
||||
Committed by: gcasa
|
||||
|
||||
2012-05-07 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Headers/AppKit/NSInterfaceStyle.h: Remove
|
||||
|
|
|
@ -33,10 +33,9 @@
|
|||
#define _GNUstep_H_IMConnectors
|
||||
|
||||
#ifndef GNUSTEP
|
||||
#import <Foundation/Foundation.h>
|
||||
#include <Foundation/Foundation.h>
|
||||
#else
|
||||
#import <Foundation/NSObject.h>
|
||||
@class NSString;
|
||||
#include <Foundation/NSObject.h>
|
||||
#endif
|
||||
|
||||
@interface IMConnector : NSObject
|
||||
|
|
|
@ -48,6 +48,10 @@
|
|||
- (void) _setMainMenu: (NSMenu*)aMenu;
|
||||
@end
|
||||
|
||||
@interface NSMenu (XibCompatibility)
|
||||
- (BOOL) _isMainMenu;
|
||||
@end
|
||||
|
||||
@interface NSCustomObject (NibCompatibility)
|
||||
- (void) setRealObject: (id)obj;
|
||||
@end
|
||||
|
@ -56,6 +60,17 @@
|
|||
- (id) nibInstantiate;
|
||||
@end
|
||||
|
||||
@implementation NSMenu (XibCompatibility)
|
||||
|
||||
- (BOOL) _isMainMenu
|
||||
{
|
||||
if (_name)
|
||||
return [_name isEqualToString:@"_NSMainMenu"];
|
||||
return NO;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation FirstResponder
|
||||
|
||||
+ (id) allocWithZone: (NSZone*)zone
|
||||
|
@ -835,7 +850,8 @@
|
|||
RETAIN(obj);
|
||||
}
|
||||
|
||||
if ([obj isKindOfClass: [NSMenu class]])
|
||||
if (([obj isKindOfClass: [NSMenu class]]) &&
|
||||
([obj _isMainMenu]))
|
||||
{
|
||||
// add the menu...
|
||||
[NSApp _setMainMenu: obj];
|
||||
|
|
Loading…
Reference in a new issue