mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 16:40:55 +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
d8a7f5aafe
commit
6cc61f7173
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>
|
2012-05-07 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Headers/AppKit/NSInterfaceStyle.h: Remove
|
* Headers/AppKit/NSInterfaceStyle.h: Remove
|
||||||
|
|
|
@ -33,10 +33,9 @@
|
||||||
#define _GNUstep_H_IMConnectors
|
#define _GNUstep_H_IMConnectors
|
||||||
|
|
||||||
#ifndef GNUSTEP
|
#ifndef GNUSTEP
|
||||||
#import <Foundation/Foundation.h>
|
#include <Foundation/Foundation.h>
|
||||||
#else
|
#else
|
||||||
#import <Foundation/NSObject.h>
|
#include <Foundation/NSObject.h>
|
||||||
@class NSString;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@interface IMConnector : NSObject
|
@interface IMConnector : NSObject
|
||||||
|
|
|
@ -48,6 +48,10 @@
|
||||||
- (void) _setMainMenu: (NSMenu*)aMenu;
|
- (void) _setMainMenu: (NSMenu*)aMenu;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@interface NSMenu (XibCompatibility)
|
||||||
|
- (BOOL) _isMainMenu;
|
||||||
|
@end
|
||||||
|
|
||||||
@interface NSCustomObject (NibCompatibility)
|
@interface NSCustomObject (NibCompatibility)
|
||||||
- (void) setRealObject: (id)obj;
|
- (void) setRealObject: (id)obj;
|
||||||
@end
|
@end
|
||||||
|
@ -56,6 +60,17 @@
|
||||||
- (id) nibInstantiate;
|
- (id) nibInstantiate;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@implementation NSMenu (XibCompatibility)
|
||||||
|
|
||||||
|
- (BOOL) _isMainMenu
|
||||||
|
{
|
||||||
|
if (_name)
|
||||||
|
return [_name isEqualToString:@"_NSMainMenu"];
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
@implementation FirstResponder
|
@implementation FirstResponder
|
||||||
|
|
||||||
+ (id) allocWithZone: (NSZone*)zone
|
+ (id) allocWithZone: (NSZone*)zone
|
||||||
|
@ -835,7 +850,8 @@
|
||||||
RETAIN(obj);
|
RETAIN(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ([obj isKindOfClass: [NSMenu class]])
|
if (([obj isKindOfClass: [NSMenu class]]) &&
|
||||||
|
([obj _isMainMenu]))
|
||||||
{
|
{
|
||||||
// add the menu...
|
// add the menu...
|
||||||
[NSApp _setMainMenu: obj];
|
[NSApp _setMainMenu: obj];
|
||||||
|
|
Loading…
Reference in a new issue