Fixed some problems with gorm files

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32029 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Germán Arias 2011-02-10 06:40:35 +00:00
parent 906201acf6
commit e310aaa25b
2 changed files with 9 additions and 20 deletions

View file

@ -1,3 +1,11 @@
2011-02-10 German Arias <german@xelalug.org>
* Source/GSGormLoading.m (-awakeWithContext:): Call directly the method
-orderFront: on visible windows, since this works fine here, instead
put these windows into _inactive list. This solve the problem of menu
in window in non document-based apps and the problem with the outlet
"initialFirstResponder" on gorm files.
2011-02-09 Fred Kiefer <FredKiefer@gmx.de> 2011-02-09 Fred Kiefer <FredKiefer@gmx.de>
* Source/GSInfoPanel.m, * Source/GSInfoPanel.m,

View file

@ -54,22 +54,6 @@ static const int currentVersion = 1; // GSNibItem version number...
- (BOOL) isInInterfaceBuilder; - (BOOL) isInInterfaceBuilder;
@end @end
@interface NSApplication (GSNibContainer)
- (void)_deactivateVisibleWindow: (NSWindow *)win;
@end
@implementation NSApplication (GSNibContainer)
/* Since awakeWithContext often gets called before the the app becomes
active, [win -orderFront:] requests get ignored, so we add the window
to the inactive list, so it gets sent an -orderFront when the app
becomes active. */
- (void) _deactivateVisibleWindow: (NSWindow *)win
{
if (_inactive)
[_inactive addObject: win];
}
@end
/* /*
* This private class is used to collect the nib items while the * This private class is used to collect the nib items while the
* .gorm file is being unarchived. This is done to allow only * .gorm file is being unarchived. This is done to allow only
@ -309,10 +293,7 @@ static NSString *GSInternalNibItemAddedNotification = @"_GSInternalNibItemAddedN
while (pos-- > 0) while (pos-- > 0)
{ {
NSWindow *win = [visibleWindows objectAtIndex: pos]; NSWindow *win = [visibleWindows objectAtIndex: pos];
if ([NSApp isActive]) [win orderFront: self];
[win orderFront: self];
else
[NSApp _deactivateVisibleWindow: win];
} }
} }