diff --git a/ChangeLog b/ChangeLog index de675f61..9bc94850 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ 2002-09-21 Pierre-Yves Rivaille - * Gorm.m: fixes segfault when leaving test mode. + * Gorm.m: fix segfault when leaving test mode. + Save whether palettes and inspectors are opened upon exiting. + Open them on startup if necessary. * GormDocument.m: fixes bad reactivating of editors. * GormBoxEditor.m: commented unused drag'n'drop code. * GormCustomView.m: added GormTestCustomView class to deal with unknown diff --git a/Gorm.m b/Gorm.m index 4e9d89ef..4f4ada15 100644 --- a/Gorm.m +++ b/Gorm.m @@ -200,6 +200,29 @@ NSString *GormLinkPboardType = @"GormLinkPboardType"; return nil; } +- (void) applicationDidFinishLaunching: (NSApplication*)sender +{ + if ( [[NSUserDefaults standardUserDefaults] boolForKey: @"ShowInspectors"] ) + { + [[[self inspectorsManager] panel] makeKeyAndOrderFront: self]; + } + if ( [[NSUserDefaults standardUserDefaults] boolForKey: @"ShowPalettes"] ) + { + [[[self palettesManager] panel] makeKeyAndOrderFront: self]; + } +} + + +- (void) applicationWillTerminate: (NSApplication*)sender +{ + [[NSUserDefaults standardUserDefaults] + setBool: [[[self inspectorsManager] panel] isVisible] + forKey: @"ShowInspectors"]; + [[NSUserDefaults standardUserDefaults] + setBool: [[[self palettesManager] panel] isVisible] + forKey: @"ShowPalettes"]; +} + - (BOOL) applicationShouldTerminate: (NSApplication*)sender { NSEnumerator *enumerator = [[self windows] objectEnumerator]; @@ -849,6 +872,7 @@ NSLog(@"StartupTime %f", [startDate timeIntervalSinceNow]); [d setObject: [NSArray arrayWithObjects: @"Gregory John Casamento ", @"Richard Frith-Macdonald ", + @"Pierre-Yves Rivaille ", nil] forKey: @"Authors"]; // [d setObject: @"See http://www.gnustep.org" forKey: @"URL"];