mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-02 03:30:59 +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.
|
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/GMArchiver.h>
|
||||||
#include "AppKit/IMCustomObject.h"
|
#include "AppKit/IMCustomObject.h"
|
||||||
|
|
||||||
|
@ -47,12 +47,12 @@ extern BOOL _fileOwnerDecoded;
|
||||||
IMCustomObject* customObject = [[self new] autorelease];
|
IMCustomObject* customObject = [[self new] autorelease];
|
||||||
Class class;
|
Class class;
|
||||||
|
|
||||||
if (!_fileOwnerDecoded) {
|
if (!_fileOwnerDecoded)
|
||||||
|
{
|
||||||
_fileOwnerDecoded = YES;
|
_fileOwnerDecoded = YES;
|
||||||
customObject->className = [unarchiver decodeStringWithName:@"className"];
|
customObject->className = [unarchiver decodeStringWithName:@"className"];
|
||||||
customObject->extension = [unarchiver decodeObjectWithName:@"extension"];
|
customObject->extension = [unarchiver decodeObjectWithName:@"extension"];
|
||||||
customObject->realObject = [unarchiver decodeObjectWithName:@"realObject"];
|
customObject->realObject = [unarchiver decodeObjectWithName:@"realObject"];
|
||||||
|
|
||||||
customObject->realObject = _nibOwner;
|
customObject->realObject = _nibOwner;
|
||||||
return customObject;
|
return customObject;
|
||||||
}
|
}
|
||||||
|
@ -63,9 +63,13 @@ extern BOOL _fileOwnerDecoded;
|
||||||
|
|
||||||
class = NSClassFromString (customObject->className);
|
class = NSClassFromString (customObject->className);
|
||||||
if (class)
|
if (class)
|
||||||
|
{
|
||||||
customObject->realObject = [[class alloc] init];
|
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;
|
return customObject;
|
||||||
|
@ -80,10 +84,14 @@ extern BOOL _fileOwnerDecoded;
|
||||||
{
|
{
|
||||||
[archiver encodeString:className withName:@"className"];
|
[archiver encodeString:className withName:@"className"];
|
||||||
if (realObject)
|
if (realObject)
|
||||||
|
{
|
||||||
[archiver encodeObject:realObject withName:@"realObject"];
|
[archiver encodeObject:realObject withName:@"realObject"];
|
||||||
|
}
|
||||||
if (extension)
|
if (extension)
|
||||||
|
{
|
||||||
[archiver encodeObject:extension withName:@"extension"];
|
[archiver encodeObject:extension withName:@"extension"];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
- (id)initWithModelUnarchiver: (GMUnarchiver*)unarchiver
|
- (id)initWithModelUnarchiver: (GMUnarchiver*)unarchiver
|
||||||
{
|
{
|
||||||
|
@ -100,7 +108,8 @@ extern BOOL _fileOwnerDecoded;
|
||||||
IMCustomView* customView = [[self new] autorelease];
|
IMCustomView* customView = [[self new] autorelease];
|
||||||
Class class;
|
Class class;
|
||||||
|
|
||||||
if (!_fileOwnerDecoded) {
|
if (!_fileOwnerDecoded)
|
||||||
|
{
|
||||||
_fileOwnerDecoded = YES;
|
_fileOwnerDecoded = YES;
|
||||||
customView->className = [unarchiver decodeStringWithName: @"className"];
|
customView->className = [unarchiver decodeStringWithName: @"className"];
|
||||||
customView->extension = [unarchiver decodeObjectWithName: @"extension"];
|
customView->extension = [unarchiver decodeObjectWithName: @"extension"];
|
||||||
|
@ -118,8 +127,12 @@ extern BOOL _fileOwnerDecoded;
|
||||||
|
|
||||||
class = NSClassFromString (customView->className);
|
class = NSClassFromString (customView->className);
|
||||||
if (class)
|
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);
|
NSLog (@"Class %@ not linked into application!", customView->className);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,10 +151,14 @@ return customView->realObject;
|
||||||
[archiver encodeRect: [self frame] withName: @"frame"];
|
[archiver encodeRect: [self frame] withName: @"frame"];
|
||||||
|
|
||||||
if (realObject)
|
if (realObject)
|
||||||
|
{
|
||||||
[archiver encodeObject:realObject withName:@"realObject"];
|
[archiver encodeObject:realObject withName:@"realObject"];
|
||||||
|
}
|
||||||
if (extension)
|
if (extension)
|
||||||
|
{
|
||||||
[archiver encodeObject:extension withName:@"extension"];
|
[archiver encodeObject:extension withName:@"extension"];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
- (id)initWithModelUnarchiver:(GMUnarchiver*)unarchiver
|
- (id)initWithModelUnarchiver:(GMUnarchiver*)unarchiver
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue