mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-02-24 12:01:16 +00:00
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:
parent
1ae5c3a2f3
commit
b747859b74
2 changed files with 34 additions and 5 deletions
|
@ -99,6 +99,17 @@
|
||||||
- (NSWindow*) window;
|
- (NSWindow*) window;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@interface NSResponder (GormMenuEditorPrivate)
|
||||||
|
- (NSMenu *) _menu;
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation NSResponder (GormMenuEditorPrivate)
|
||||||
|
- (NSMenu *) _menu
|
||||||
|
{
|
||||||
|
return _menu;
|
||||||
|
}
|
||||||
|
@end
|
||||||
|
|
||||||
@interface GormMenuEditor (Private)
|
@interface GormMenuEditor (Private)
|
||||||
- (NSEvent *) editTextField: view withEvent: (NSEvent *)theEvent;
|
- (NSEvent *) editTextField: view withEvent: (NSEvent *)theEvent;
|
||||||
@end
|
@end
|
||||||
|
@ -712,7 +723,7 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ([_menu _ownedByPopUp])
|
if ([[self _menu] _ownedByPopUp])
|
||||||
{
|
{
|
||||||
[item setOnStateImage: nil];
|
[item setOnStateImage: nil];
|
||||||
[item setMixedStateImage: nil];
|
[item setMixedStateImage: nil];
|
||||||
|
|
|
@ -24,6 +24,24 @@
|
||||||
|
|
||||||
#include "GormNSMenu.h"
|
#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
|
@interface GormNSMenuWindow : NSWindow
|
||||||
{
|
{
|
||||||
GormDocument *_document;
|
GormDocument *_document;
|
||||||
|
@ -42,7 +60,7 @@
|
||||||
|
|
||||||
- (void)setMenu: (NSMenu*)menu;
|
- (void)setMenu: (NSMenu*)menu;
|
||||||
{
|
{
|
||||||
_menu = menu;
|
[self _setMenu: menu];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setDocument: (GormDocument *)document
|
- (void)setDocument: (GormDocument *)document
|
||||||
|
@ -53,11 +71,11 @@
|
||||||
- (void)resignMainWindow
|
- (void)resignMainWindow
|
||||||
{
|
{
|
||||||
[super resignMainWindow];
|
[super resignMainWindow];
|
||||||
if ([_menu _ownedByPopUp])
|
if ([[self _menu] _ownedByPopUp])
|
||||||
{
|
{
|
||||||
[[NSRunLoop currentRunLoop]
|
[[NSRunLoop currentRunLoop]
|
||||||
performSelector: @selector(close)
|
performSelector: @selector(close)
|
||||||
target: _menu
|
target: [self _menu]
|
||||||
argument: nil
|
argument: nil
|
||||||
order: 500000
|
order: 500000
|
||||||
modes: [NSArray arrayWithObjects:
|
modes: [NSArray arrayWithObjects:
|
||||||
|
@ -70,7 +88,7 @@
|
||||||
- (void)becomeMainWindow
|
- (void)becomeMainWindow
|
||||||
{
|
{
|
||||||
[super becomeMainWindow];
|
[super becomeMainWindow];
|
||||||
if ([_menu _ownedByPopUp] )
|
if ([[self _menu] _ownedByPopUp] )
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue