mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 07:00:46 +00:00
Verfiy bundle loading, make sure nib loaded visibile windows get orderedFront.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10021 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
02d40b3d81
commit
ca76560c9e
4 changed files with 34 additions and 3 deletions
|
@ -1,3 +1,12 @@
|
|||
2001-05-24 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* Source/NSApplication.m (initialize_gnustep_backend): Check if
|
||||
bundle loading actually worked.
|
||||
|
||||
* Source/NSBundleAdditions.m ([NSApplication
|
||||
-_deactivateVisibleWindow:]): New method.
|
||||
([GSNibContainer -awakeWithContext:]): Use it when app is not active.
|
||||
|
||||
2000-05-21 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSFont.m
|
||||
|
|
|
@ -151,6 +151,7 @@ initialize_gnustep_backend(void)
|
|||
first = 0;
|
||||
#ifdef BACKEND_BUNDLE
|
||||
{
|
||||
Class backend;
|
||||
NSBundle *theBundle;
|
||||
NSEnumerator *benum;
|
||||
NSString *path, *bundleName;
|
||||
|
@ -179,7 +180,9 @@ initialize_gnustep_backend(void)
|
|||
|
||||
theBundle = [NSBundle bundleWithPath: path];
|
||||
NSCAssert(theBundle != nil, @"Can't init backend bundle");
|
||||
[[theBundle classNamed: @"GSBackend"] initializeBackend];
|
||||
backend = [theBundle classNamed: @"GSBackend"];
|
||||
NSCAssert(backend, @"Can't load backend bundle");
|
||||
[backend initializeBackend];
|
||||
}
|
||||
#else
|
||||
[GSBackend initializeBackend];
|
||||
|
|
|
@ -368,6 +368,22 @@
|
|||
|
||||
|
||||
|
||||
@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
|
||||
|
||||
/*
|
||||
* The GSNibContainer class manages the internals of a nib file.
|
||||
*/
|
||||
|
@ -440,7 +456,11 @@
|
|||
|
||||
while (pos-- > 0)
|
||||
{
|
||||
[[visible objectAtIndex: pos] orderFront: self];
|
||||
NSWindow *win = [visible objectAtIndex: pos];
|
||||
if ([NSApp isActive])
|
||||
[win orderFront: self];
|
||||
else
|
||||
[NSApp _deactivateVisibleWindow: win];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -203,7 +203,6 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
|
|||
e = [array objectEnumerator];
|
||||
while ((o = [e nextObject]))
|
||||
{
|
||||
NSDebugLog(@"extension %s\n", [o cString]);
|
||||
path = [main_bundle pathForResource: the_name
|
||||
ofType: o];
|
||||
if (path != nil && [path length] != 0)
|
||||
|
|
Loading…
Reference in a new issue