Added new resource manager.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@21139 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2005-04-22 00:43:10 +00:00
parent a685897ef9
commit 6618ced98b
6 changed files with 84 additions and 3 deletions

View file

@ -1,3 +1,11 @@
2005-04-21 20:40 Gregory John Casamento <greg_casamento@yahoo.com>
* GormCore/GNUmakefile: Build the new resource manager.
* GormCore/GormDocument.m: Register the new resource manager.
* GormCore/GormViewResourceManager.m: New resource manager for views.
* GormLib/IBResourceManager.m: Removed views for the main resource
manager.
2005-04-21 00:39 Gregory John Casamento <greg_casamento@yahoo.com>
* GormCore/GormViewEditor.m: Fix for double "setView:" call.

View file

@ -156,6 +156,7 @@ GormCore_HEADER_FILES = \
GormSplitViewEditor.h \
GormViewEditor.h \
GormViewKnobs.h \
GormViewResourceManager.h \
GormViewWindow.h \
GormViewWithContentViewEditor.h \
GormViewWithSubviewsEditor.h \
@ -202,6 +203,7 @@ GormCore_OBJC_FILES = \
GormSplitViewEditor.m \
GormViewEditor.m \
GormViewKnobs.m \
GormViewResourceManager.m \
GormViewSizeInspector.m \
GormViewWindow.m \
GormViewWithContentViewEditor.m \

View file

@ -45,6 +45,7 @@
#include "NSView+GormExtensions.h"
#include "GormSound.h"
#include "GormImage.h"
#include "GormViewResourceManager.h"
@interface GormDisplayCell : NSButtonCell
@end
@ -188,9 +189,10 @@ static NSImage *fileImage = nil;
fileImage = [[NSImage alloc] initWithContentsOfFile: path];
}
// create the resource manager...
// register the resource managers...
[IBResourceManager registerResourceManagerClass: [IBResourceManager class]];
[IBResourceManager registerResourceManagerClass: [GormViewResourceManager class]];
[self setVersion: GNUSTEP_NIB_VERSION];
}
}

View file

@ -0,0 +1,33 @@
/* GormViewResourceManager.h
*
* Copyright (C) 2005 Free Software Foundation, Inc.
*
* Author: Gregory John Casamento <greg_casamento@yahoo.com>
* Date: 2005
*
* 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 2 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., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef INCLUDED_GORMVIEWRESOURCEMANAGER_H
#define INCLUDED_GORMVIEWRESOURCEMANAGER_H
#include <InterfaceBuilder/IBResourceManager.h>
@interface GormViewResourceManager : IBResourceManager
@end
#endif

View file

@ -0,0 +1,36 @@
/* GormViewResourceManager.m
*
* Copyright (C) 2005 Free Software Foundation, Inc.
*
* Author: Gregory John Casamento <greg_casamento@yahoo.com>
* Date: 2005
*
* 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 2 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., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <Foundation/NSArray.h>
#include <InterfaceBuilder/IBPalette.h>
#include "GormViewResourceManager.h"
@implementation GormViewResourceManager
- (NSArray *) resourcePasteboardTypes
{
return [NSArray arrayWithObjects: IBViewPboardType, nil];
}
@end

View file

@ -224,7 +224,7 @@ static NSMapTable *_resourceManagers = NULL;
- (NSArray *) resourcePasteboardTypes
{
return [NSArray arrayWithObjects: IBObjectPboardType, IBViewPboardType, nil];
return [NSArray arrayWithObjects: IBObjectPboardType, nil];
}
- (NSArray *) resourcesForObjects: (NSArray *)objs;