mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-23 06:20:47 +00:00
* Gorm.m
* Plugins/Nib/GNUmakefile: Add new class to makefile. * Plugins/Nib/GormNibWrapperLoader.m: Modified to use GormWindowTemplate. * Plugins/Nib/GormWindowTemplate.[hm]: Replace flags used only at runtime when the template is loaded. This is so, for example, the released when closed flag will not cause issues when editing the window. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@29168 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
07750a7f5f
commit
63a656b958
6 changed files with 106 additions and 15 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2009-12-27 01:17-EST Gregory John Casamento <greg.casamento@gmail.com>
|
||||
|
||||
* Gorm.m
|
||||
* Plugins/Nib/GNUmakefile: Add new class to makefile.
|
||||
* Plugins/Nib/GormNibWrapperLoader.m: Modified to use
|
||||
GormWindowTemplate.
|
||||
* Plugins/Nib/GormWindowTemplate.[hm]: Replace flags
|
||||
used only at runtime when the template is loaded. This is
|
||||
so, for example, the released when closed flag will not cause
|
||||
issues when editing the window.
|
||||
|
||||
2009-12-01 Riccardo Mottola <rmottola@users.sf.net>
|
||||
|
||||
* Gorm.m: do not open untitled document on application start
|
||||
|
|
2
Gorm.m
2
Gorm.m
|
@ -177,7 +177,7 @@
|
|||
|
||||
- (BOOL)applicationShouldOpenUntitledFile: (NSApplication *)sender
|
||||
{
|
||||
return NO;
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void) applicationDidFinishLaunching: (NSApplication*)sender
|
||||
|
|
|
@ -30,7 +30,8 @@ Nib_PRINCIPAL_CLASS = GormNibPlugin
|
|||
|
||||
Nib_OBJC_FILES = GormNibPlugin.m \
|
||||
GormNibWrapperBuilder.m \
|
||||
GormNibWrapperLoader.m
|
||||
GormNibWrapperLoader.m \
|
||||
GormWindowTemplate.m
|
||||
|
||||
Nib_RESOURCE_FILES =
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
/* GormNibWrapperLoader
|
||||
*
|
||||
* This class is a subclass of the NSDocumentController
|
||||
*
|
||||
* Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
*
|
||||
|
@ -35,17 +33,7 @@
|
|||
#include <GormCore/GormFunctions.h>
|
||||
#include <GormCore/GormCustomView.h>
|
||||
#include "GormNibWrapperLoader.h"
|
||||
|
||||
@interface NSWindowTemplate (Private)
|
||||
- (void) setBaseWindowClass: (Class) clz;
|
||||
@end
|
||||
|
||||
@implementation NSWindowTemplate (Private)
|
||||
- (void) setBaseWindowClass: (Class) clz
|
||||
{
|
||||
_baseWindowClass = clz;
|
||||
}
|
||||
@end
|
||||
#include "GormWindowTemplate.h"
|
||||
|
||||
@implementation GormNibWrapperLoader
|
||||
+ (NSString *) fileType
|
||||
|
@ -148,6 +136,8 @@
|
|||
forClassName: @"NSCustomObject"];
|
||||
[u setClass: [GormCustomView class]
|
||||
forClassName: @"NSCustomView"];
|
||||
[u setClass: [GormWindowTemplate class]
|
||||
forClassName: @"NSWindowTemplate"];
|
||||
|
||||
/*
|
||||
* Substitute any classes specified by the palettes...
|
||||
|
|
39
Plugins/Nib/GormWindowTemplate.h
Normal file
39
Plugins/Nib/GormWindowTemplate.h
Normal file
|
@ -0,0 +1,39 @@
|
|||
/* GormWindowTemplate
|
||||
*
|
||||
* Copyright (C) 2009 Free Software Foundation, Inc.
|
||||
*
|
||||
* Author: Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
* Date: 2009
|
||||
*
|
||||
* This file is part of GNUstep.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
|
||||
*/
|
||||
|
||||
#include <Foundation/Foundation.h>
|
||||
#include <AppKit/AppKit.h>
|
||||
#include <GNUstepGUI/GSNibLoading.h>
|
||||
|
||||
@interface NSWindowTemplate (Private)
|
||||
- (void) setBaseWindowClass: (Class) clz;
|
||||
@end
|
||||
|
||||
@interface GormWindowTemplate : NSWindowTemplate
|
||||
{
|
||||
BOOL _tempFlag;
|
||||
}
|
||||
@end
|
||||
|
||||
|
50
Plugins/Nib/GormWindowTemplate.m
Normal file
50
Plugins/Nib/GormWindowTemplate.m
Normal file
|
@ -0,0 +1,50 @@
|
|||
/* GormWindowTemplate
|
||||
*
|
||||
* Copyright (C) 2009 Free Software Foundation, Inc.
|
||||
*
|
||||
* Author: Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
* Date: 2009
|
||||
*
|
||||
* This file is part of GNUstep.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
|
||||
*/
|
||||
|
||||
#include "GormWindowTemplate.h"
|
||||
|
||||
@interface NSWindow (Private)
|
||||
- (void) _setReleasedWhenClosed: (BOOL)flags;
|
||||
@end
|
||||
|
||||
@implementation NSWindowTemplate (Private)
|
||||
- (void) setBaseWindowClass: (Class) clz
|
||||
{
|
||||
_baseWindowClass = clz;
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation GormWindowTemplate
|
||||
- (id) nibInstantiate
|
||||
{
|
||||
id object = [super nibInstantiate];
|
||||
BOOL flag = [object isReleasedWhenClosed];
|
||||
|
||||
[object setReleasedWhenClosed: NO];
|
||||
[object _setReleasedWhenClosed: flag];
|
||||
|
||||
return object;
|
||||
}
|
||||
@end
|
||||
|
Loading…
Reference in a new issue