mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 16:40:50 +00:00
Indented - replace an import with an include
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@9568 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
aa01b42326
commit
ebf6a37c31
1 changed files with 63 additions and 46 deletions
|
@ -23,7 +23,7 @@
|
|||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
|
||||
*/
|
||||
|
||||
#import <Foundation/NSObjCRuntime.h>
|
||||
#include <Foundation/NSObjCRuntime.h>
|
||||
#include <AppKit/GMArchiver.h>
|
||||
#include "AppKit/IMCustomObject.h"
|
||||
|
||||
|
@ -47,12 +47,12 @@ extern BOOL _fileOwnerDecoded;
|
|||
IMCustomObject* customObject = [[self new] autorelease];
|
||||
Class class;
|
||||
|
||||
if (!_fileOwnerDecoded) {
|
||||
if (!_fileOwnerDecoded)
|
||||
{
|
||||
_fileOwnerDecoded = YES;
|
||||
customObject->className = [unarchiver decodeStringWithName:@"className"];
|
||||
customObject->extension = [unarchiver decodeObjectWithName:@"extension"];
|
||||
customObject->realObject = [unarchiver decodeObjectWithName:@"realObject"];
|
||||
|
||||
customObject->realObject = _nibOwner;
|
||||
return customObject;
|
||||
}
|
||||
|
@ -63,9 +63,13 @@ extern BOOL _fileOwnerDecoded;
|
|||
|
||||
class = NSClassFromString (customObject->className);
|
||||
if (class)
|
||||
{
|
||||
customObject->realObject = [[class alloc] init];
|
||||
else {
|
||||
NSLog (@"Class %@ not linked into application!", customObject->className);
|
||||
}
|
||||
else
|
||||
{
|
||||
NSLog (@"Class %@ not linked into application!",
|
||||
customObject->className);
|
||||
}
|
||||
|
||||
return customObject;
|
||||
|
@ -80,10 +84,14 @@ extern BOOL _fileOwnerDecoded;
|
|||
{
|
||||
[archiver encodeString:className withName:@"className"];
|
||||
if (realObject)
|
||||
{
|
||||
[archiver encodeObject:realObject withName:@"realObject"];
|
||||
}
|
||||
if (extension)
|
||||
{
|
||||
[archiver encodeObject:extension withName:@"extension"];
|
||||
}
|
||||
}
|
||||
|
||||
- (id)initWithModelUnarchiver: (GMUnarchiver*)unarchiver
|
||||
{
|
||||
|
@ -100,7 +108,8 @@ extern BOOL _fileOwnerDecoded;
|
|||
IMCustomView* customView = [[self new] autorelease];
|
||||
Class class;
|
||||
|
||||
if (!_fileOwnerDecoded) {
|
||||
if (!_fileOwnerDecoded)
|
||||
{
|
||||
_fileOwnerDecoded = YES;
|
||||
customView->className = [unarchiver decodeStringWithName: @"className"];
|
||||
customView->extension = [unarchiver decodeObjectWithName: @"extension"];
|
||||
|
@ -118,8 +127,12 @@ extern BOOL _fileOwnerDecoded;
|
|||
|
||||
class = NSClassFromString (customView->className);
|
||||
if (class)
|
||||
customView->realObject = [[class alloc] initWithFrame:[customView frame]];
|
||||
else {
|
||||
{
|
||||
customView->realObject = [[class alloc] initWithFrame:
|
||||
[customView frame]];
|
||||
}
|
||||
else
|
||||
{
|
||||
NSLog (@"Class %@ not linked into application!", customView->className);
|
||||
}
|
||||
|
||||
|
@ -138,10 +151,14 @@ return customView->realObject;
|
|||
[archiver encodeRect: [self frame] withName: @"frame"];
|
||||
|
||||
if (realObject)
|
||||
{
|
||||
[archiver encodeObject:realObject withName:@"realObject"];
|
||||
}
|
||||
if (extension)
|
||||
{
|
||||
[archiver encodeObject:extension withName:@"extension"];
|
||||
}
|
||||
}
|
||||
|
||||
- (id)initWithModelUnarchiver:(GMUnarchiver*)unarchiver
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue