From e7d5af02533327f3aa592679faa08f3e6b72448c Mon Sep 17 00:00:00 2001 From: Gregory John Casamento Date: Sun, 16 May 2004 21:20:14 +0000 Subject: [PATCH] Corrected some menu issues with testing and added the paletteDocument method to IBPalette.[hm]. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@19356 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 10 ++++++++++ Gorm.m | 5 +++++ GormLib/IBPalette.h | 12 ++++++++++-- GormLib/IBPalette.m | 5 +++++ 4 files changed, 30 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0233b14d..484e57e8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2004-05-16 07:20 Gregory John Casamento + + * Gorm.m: in testInterface: bring the temporary menu to the + front. There has been an issue with it sometimes not + displaying. In endTesting bring the normal menu to the front. + In unhide, bring the menu to the front. + * GormLib/IBPalette.[hm]: Added paletteDocument method as + per specs. Currently this method will return nil unless + the ivar is set to something conforming to IBDocuments. + 2004-05-16 07:20 Gregory John Casamento * GormSoundEditor.m: Added methods to GormSound class to diff --git a/Gorm.m b/Gorm.m index 0cebc86e..979e722b 100644 --- a/Gorm.m +++ b/Gorm.m @@ -782,6 +782,9 @@ NSString *GormResizeCellNotification = @"GormResizeCellNotification"; keyEquivalent: @"q"]; } } + + // display the current main menu... + [[self mainMenu] display]; [notifCenter postNotificationName: IBDidBeginTestingInterfaceNotification object: self]; @@ -1054,6 +1057,7 @@ NSString *GormResizeCellNotification = @"GormResizeCellNotification"; } [self setMainMenu: mainMenu]; + [mainMenu display]; // bring it to the front... isTesting = NO; @@ -1478,6 +1482,7 @@ NSString *GormResizeCellNotification = @"GormResizeCellNotification"; [(GormDocument *)document setDocumentActive: NO]; [(GormDocument *)document setDocumentActive: YES]; [window orderFront: sender]; + [[self mainMenu] display]; } } diff --git a/GormLib/IBPalette.h b/GormLib/IBPalette.h index 55bc365a..956798a6 100644 --- a/GormLib/IBPalette.h +++ b/GormLib/IBPalette.h @@ -27,6 +27,7 @@ #include #include +#include // forward references @class NSString; @@ -58,8 +59,9 @@ extern NSString *GormLinkPboardType; @interface IBPalette : NSObject { - NSWindow *window; - NSImage *icon; + NSWindow *window; + NSImage *icon; + id document; } /* * For internal use only - these class methods return the information @@ -101,5 +103,11 @@ extern NSString *GormLinkPboardType; * palette. */ - (NSWindow*) originalWindow; + +/** + * Returns an object representing the palette which conforms to the + * IBDocuments protocol. + */ +- (id) paletteDocument; @end #endif diff --git a/GormLib/IBPalette.m b/GormLib/IBPalette.m index 5add6784..e402faca 100644 --- a/GormLib/IBPalette.m +++ b/GormLib/IBPalette.m @@ -143,5 +143,10 @@ static NSMapTable *viewToType = 0; { return window; } + +- (id) paletteDocument +{ + return document; +} @end