mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-22 22:20:44 +00:00
Make Inspector's shortcuts available globally again.
This commit is contained in:
parent
e9be2214d2
commit
a819f689f3
2 changed files with 24 additions and 1 deletions
|
@ -23,6 +23,7 @@
|
|||
* USA.
|
||||
*/
|
||||
|
||||
#include "AppKit/NSApplication.h"
|
||||
#import <Foundation/NSArray.h>
|
||||
#import <Foundation/NSDictionary.h>
|
||||
#import <Foundation/NSSet.h>
|
||||
|
@ -33,6 +34,28 @@
|
|||
#import "GormAppDelegate.h"
|
||||
#import "GormLanguageViewController.h"
|
||||
|
||||
@interface Gorm : NSApplication
|
||||
@end
|
||||
@implementation Gorm
|
||||
|
||||
/*
|
||||
NSApplication override to make Inspector's shortcuts available globally
|
||||
*/
|
||||
- (void) sendEvent: (NSEvent *)theEvent
|
||||
{
|
||||
if ([theEvent type] == NSKeyDown)
|
||||
{
|
||||
NSPanel *inspector = [[_delegate inspectorsManager] panel];
|
||||
if ([inspector performKeyEquivalent: theEvent] != NO)
|
||||
{
|
||||
[inspector orderFront: self];
|
||||
return;
|
||||
}
|
||||
}
|
||||
[super sendEvent: theEvent];
|
||||
}
|
||||
@end
|
||||
|
||||
@interface GormDocument (Private)
|
||||
|
||||
- (NSMutableArray *) _collectAllObjects;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
NSIcon = "Gorm.tiff";
|
||||
NSMainNibFile = "Gorm.gorm";
|
||||
NSPrincipalClass = "NSApplication";
|
||||
NSPrincipalClass = "Gorm";
|
||||
NSRole = "Editor";
|
||||
|
||||
NSTypes = (
|
||||
|
|
Loading…
Reference in a new issue