* GNUmakefile: Remove FileRTF.tiff from resoures.

* Images/FileRTF.tiff: Removed.
* Images/FileM.tiff,
* Images/FileMH.tiff,
* Images/FileH.tiff,
* Images/FileHH.tiff,
* Images/FileC.tiff,
* Images/FileCH.tiff,
Moved to Modules/Editors/ProjectEditor/Resources.
* Modules/Editors/ProjectCenter/PCEditor.h: Added new variable
_isEditable.
* Modules/Editors/ProjectCenter/PCEditor.m:
(_createEditorViewWithFrame:): Set editable state for NSTextView here.
Add observer for changed text notification here.
* Resources/Info.plist: NSTypes was extended.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@25954 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Sergii Stoian 2008-01-16 00:35:17 +00:00
parent e7781cc811
commit 993f6d5b82
12 changed files with 59 additions and 27 deletions

View file

@ -1,4 +1,22 @@
2008-01-15 Sergii Stoian <stoyan255@gmail.com>
2008-01-16 Sergii Stoian <stoyan255@gmail.com>
* GNUmakefile: Remove FileRTF.tiff from resoures.
* Images/FileRTF.tiff: Removed.
* Images/FileM.tiff,
* Images/FileMH.tiff,
* Images/FileH.tiff,
* Images/FileHH.tiff,
* Images/FileC.tiff,
* Images/FileCH.tiff,
Moved to Modules/Editors/ProjectEditor/Resources.
* Modules/Editors/ProjectCenter/PCEditor.h: Added new variable
_isEditable.
* Modules/Editors/ProjectCenter/PCEditor.m:
(_createEditorViewWithFrame:): Set editable state for NSTextView here.
Add observer for changed text notification here.
* Resources/Info.plist: NSTypes was extended.
2008-01-15 Sergii Stoian <stoyan255@gmail.com>
* Framework/PCBundleManager.m: (objectForClassName:bundleType:protocol:)
Return nil if className is nil.

View file

@ -33,7 +33,6 @@ SUBPROJECTS = \
ProjectCenter_RESOURCE_FILES = \
Resources/Info-gnustep.plist \
Images/ProjectCenter.tiff \
Images/FileRTF.tiff \
Images/FileProject.tiff \
Images/Build.tiff \
Images/Clean.tiff \

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -50,6 +50,7 @@
BOOL _isEdited;
BOOL _isEditable;
BOOL _isWindowed;
BOOL _isExternal;

View file

@ -70,7 +70,7 @@
(NSViewWidthSizable|NSViewHeightSizable)];
rect = [[_extScrollView contentView] frame];
// Editor view
// Text view
_extEditorView = [self _createEditorViewWithFrame:rect];
// Include editor view
@ -135,7 +135,6 @@
[ev setMinSize:NSMakeSize(0, 0)];
[ev setMaxSize:NSMakeSize(1e7, 1e7)];
[ev setRichText:YES];
[ev setEditable:YES];
[ev setVerticallyResizable:YES];
[ev setHorizontallyResizable:NO];
[ev setAutoresizingMask:NSViewWidthSizable|NSViewHeightSizable];
@ -144,6 +143,13 @@
[[ev textContainer] setContainerSize:NSMakeSize(fr.size.width, 1e7)];
[ev setEditable:_isEditable];
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(textDidChange:)
name:NSTextDidChangeNotification
object:ev];
return ev;
}
@ -247,6 +253,7 @@
projectEditor = aProjectEditor;
_path = [file copy];
_categoryPath = [categoryPath copy];
_isEditable = editable;
// Prepare
font = [NSFont userFixedPitchFontOfSize:0.0];
@ -277,22 +284,9 @@
if (![[ud objectForKey:SeparateEditor] isEqualToString:@"YES"])
{
[self _createInternalView];
[_intEditorView setEditable:editable];
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(textDidChange:)
name:NSTextDidChangeNotification
object:_intEditorView];
}
}
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(textDidChange:)
name:NSTextDidChangeNotification
object:_extEditorView];
// File open was finished
[[NSNotificationCenter defaultCenter]
postNotificationName:PCEditorDidOpenNotification

View file

@ -21,24 +21,44 @@
NSRole = "Editor";
NSTypes = (
{
NSUnixExtensions = ( "project" );
NSIcon = "FileProject.tiff";
NSDocumentClass = PCProjectDocument;
NSHumanReadableName = "GNUstep project";
NSIcon = FileProject.tiff;
NSName = GSPCProjectFileType;
NSRole = Editor;
NSUnixExtensions = ( project );
},
{
NSUnixExtensions = ( "pcproj" );
NSIcon = "FileProject.tiff";
NSDocumentClass = PCProjectDocument;
NSHumanReadableName = "GNUstep project";
NSIcon = FileProject.tiff;
NSName = GSPCFileType;
NSRole = Editor;
NSUnixExtensions = ( pcproj );
},
{
NSUnixExtensions = ( "m" );
NSIcon = "FileM.tiff";
NSDocumentClass = PCClassDocument;
NSHumanReadableName = "Objective C class file";
NSIcon = ProjectCenter.editor/Resources/FileM.tiff;
NSName = GSPClassType;
NSRole = Editor;
NSUnixExtensions = ( m );
},
{
NSUnixExtensions = ( "h" );
NSIcon = "FileH.tiff";
NSDocumentClass = PCHeaderDocument;
NSHumanReadableName = "C or Objective C header file";
NSIcon = ProjectCenter.editor/Resources/FileH.tiff;
NSName = GSPCHeaderType;
NSRole = Editor;
NSUnixExtensions = ( h );
},
{
NSUnixExtensions = ( "c" );
NSIcon = "FileC.tiff";
NSDocumentClass = PCCDocument;
NSHumanReadableName = "C file";
NSIcon = ProjectCenter.editor/Resources/FileC.tiff;
NSName = GSPCCType;
NSRole = Editor;
NSUnixExtensions = ( c );
}
);
URL = "See http://www.gnustep.org/";