* Gorm.m:

Save whether palettes and inspectors are opened upon exiting.
  Open them on startup if necessary.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@14505 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Pierre-Yves Rivaille 2002-09-21 16:20:13 +00:00
parent 48811d53de
commit ccd18fd904
2 changed files with 27 additions and 1 deletions

View file

@ -1,6 +1,8 @@
2002-09-21 Pierre-Yves Rivaille <pyrivail@ens-lyon.fr> 2002-09-21 Pierre-Yves Rivaille <pyrivail@ens-lyon.fr>
* 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. * GormDocument.m: fixes bad reactivating of editors.
* GormBoxEditor.m: commented unused drag'n'drop code. * GormBoxEditor.m: commented unused drag'n'drop code.
* GormCustomView.m: added GormTestCustomView class to deal with unknown * GormCustomView.m: added GormTestCustomView class to deal with unknown

24
Gorm.m
View file

@ -200,6 +200,29 @@ NSString *GormLinkPboardType = @"GormLinkPboardType";
return nil; 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 - (BOOL) applicationShouldTerminate: (NSApplication*)sender
{ {
NSEnumerator *enumerator = [[self windows] objectEnumerator]; NSEnumerator *enumerator = [[self windows] objectEnumerator];
@ -849,6 +872,7 @@ NSLog(@"StartupTime %f", [startDate timeIntervalSinceNow]);
[d setObject: [NSArray arrayWithObjects: [d setObject: [NSArray arrayWithObjects:
@"Gregory John Casamento <greg_casamento@yahoo.com>", @"Gregory John Casamento <greg_casamento@yahoo.com>",
@"Richard Frith-Macdonald <rfm@gnu.org>", @"Richard Frith-Macdonald <rfm@gnu.org>",
@"Pierre-Yves Rivaille <pyrivail@ens-lyon.fr>",
nil] nil]
forKey: @"Authors"]; forKey: @"Authors"];
// [d setObject: @"See http://www.gnustep.org" forKey: @"URL"]; // [d setObject: @"See http://www.gnustep.org" forKey: @"URL"];