Correction for Gorm to correspond with change in gui to make _menu private in NSResponder.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@17328 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2003-07-24 04:40:55 +00:00
parent 1ae5c3a2f3
commit b747859b74
2 changed files with 34 additions and 5 deletions

View file

@ -99,6 +99,17 @@
- (NSWindow*) window;
@end
@interface NSResponder (GormMenuEditorPrivate)
- (NSMenu *) _menu;
@end
@implementation NSResponder (GormMenuEditorPrivate)
- (NSMenu *) _menu
{
return _menu;
}
@end
@interface GormMenuEditor (Private)
- (NSEvent *) editTextField: view withEvent: (NSEvent *)theEvent;
@end
@ -712,7 +723,7 @@
}
else
{
if ([_menu _ownedByPopUp])
if ([[self _menu] _ownedByPopUp])
{
[item setOnStateImage: nil];
[item setMixedStateImage: nil];

View file

@ -24,6 +24,24 @@
#include "GormNSMenu.h"
// this must be done here, since Gorm must access this variable..
@interface NSResponder (GormNSMenuPrivate)
- (NSMenu *) _menu;
- (void) _setMenu: (NSMenu *)m;
@end
@implementation NSResponder (GormNSMenuPrivate)
- (NSMenu *) _menu
{
return _menu;
}
- (void) _setMenu: (NSMenu *)m
{
_menu = m;
}
@end
@interface GormNSMenuWindow : NSWindow
{
GormDocument *_document;
@ -42,7 +60,7 @@
- (void)setMenu: (NSMenu*)menu;
{
_menu = menu;
[self _setMenu: menu];
}
- (void)setDocument: (GormDocument *)document
@ -53,11 +71,11 @@
- (void)resignMainWindow
{
[super resignMainWindow];
if ([_menu _ownedByPopUp])
if ([[self _menu] _ownedByPopUp])
{
[[NSRunLoop currentRunLoop]
performSelector: @selector(close)
target: _menu
target: [self _menu]
argument: nil
order: 500000
modes: [NSArray arrayWithObjects:
@ -70,7 +88,7 @@
- (void)becomeMainWindow
{
[super becomeMainWindow];
if ([_menu _ownedByPopUp] )
if ([[self _menu] _ownedByPopUp] )
{
}