Improvements for use with menu in-window

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@34946 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Germán Arias 2012-03-18 02:00:32 +00:00
parent f60329ed6d
commit f0429f9b63
2 changed files with 29 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2012-03-17 German A. Arias <german@xelalug.org>
* Gorm.m: Added method -applicationShouldTerminateAfterLastWindowClosed:
to avoid terminate Gorm when the user close the last window but have
documents minimized at taskbar.
2012-02-19 18:58-EST Gregory John Casamento <greg.casamento@gmail.com>
* Version

23
Gorm.m
View file

@ -250,6 +250,29 @@
forKey: @"ShowPalettes"];
}
- (BOOL) applicationShouldTerminateAfterLastWindowClosed: (id)sender
{
if (NSInterfaceStyleForKey(@"NSMenuInterfaceStyle", nil) ==
NSWindows95InterfaceStyle)
{
NSDocumentController *docController;
docController = [NSDocumentController sharedDocumentController];
if ([[docController documents] count] > 0)
{
return NO;
}
else
{
return YES;
}
}
else
{
return NO;
}
}
- (GormClassManager*) classManager
{
id document = [self activeDocument];