mirror of
https://github.com/gnustep/apps-projectcenter.git
synced 2025-02-19 01:51:09 +00:00
Cleaned up the header files ( added ifndef/define statements ), splitted the
ProjectCenter.h header and some other cleanups. Editor now send notifications whenever they become or resign key. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@12389 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
62f64889bd
commit
a634432d6f
19 changed files with 111 additions and 66 deletions
|
@ -62,7 +62,8 @@ ProjectType.h \
|
|||
Server.h \
|
||||
PCSplitView.h \
|
||||
PCEditor.h \
|
||||
PCEditorController.h
|
||||
PCEditorController.h \
|
||||
PCDefines.h
|
||||
|
||||
#
|
||||
|
||||
|
|
|
@ -24,6 +24,9 @@
|
|||
$Id$
|
||||
*/
|
||||
|
||||
#ifndef _PCBROWSERCONTROLLER_H
|
||||
#define _PCBROWSERCONTROLLER_H
|
||||
|
||||
#import <AppKit/AppKit.h>
|
||||
|
||||
@class PCProject;
|
||||
|
@ -56,3 +59,5 @@
|
|||
- (BOOL)browser:(NSBrowser *)sender selectCellWithString:(NSString *)title inColumn:(int)column;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
|
|
|
@ -24,6 +24,9 @@
|
|||
$Id$
|
||||
*/
|
||||
|
||||
#ifndef _PCBUNDLELOADER_H
|
||||
#define _PCBUNDLELOADER_H
|
||||
|
||||
/*
|
||||
Descriotion:
|
||||
|
||||
|
@ -68,3 +71,5 @@
|
|||
- (void)bundleLoader:(id)sender didLoadBundle:(NSBundle *)aBundle;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
|
|
|
@ -45,6 +45,8 @@
|
|||
- (BOOL)revertFile;
|
||||
|
||||
- (void)windowWillClose:(NSNotification *)aNotif;
|
||||
- (void)windowDidBecomeKey:(NSNotification *)aNotification;
|
||||
- (void)windowDidResignKey:(NSNotification *)aNotification;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -54,5 +56,8 @@
|
|||
|
||||
@end
|
||||
|
||||
extern NSString *PCEditorDidBecomeKeyNotification;
|
||||
extern NSString *PCEditorDidResignKeyNotification;
|
||||
|
||||
#endif // _PCEDITOR_H_
|
||||
|
||||
|
|
|
@ -11,6 +11,9 @@
|
|||
#import "PCEditor.h"
|
||||
#import "PCEditorView.h"
|
||||
|
||||
NSString *PCEditorDidBecomeKeyNotification=@"PCEditorDidBecomeKeyNotification";
|
||||
NSString *PCEditorDidResignKeyNotification=@"PCEditorDidResignKeyNotification";
|
||||
|
||||
@interface PCEditor (InitUI)
|
||||
|
||||
- (void)_initUI;
|
||||
|
@ -200,12 +203,28 @@
|
|||
[view setText:text];
|
||||
}
|
||||
|
||||
- (void)windowWillClose:(NSNotification *)aNotif
|
||||
- (void)windowWillClose:(NSNotification *)aNotification
|
||||
{
|
||||
if( [[aNotif object] isEqual:window] )
|
||||
if( [[aNotification object] isEqual:window] )
|
||||
{
|
||||
[self close];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)windowDidBecomeKey:(NSNotification *)aNotification
|
||||
{
|
||||
if( [[aNotification object] isEqual:window] )
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:PCEditorDidBecomeKeyNotification object:self];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)windowDidResignKey:(NSNotification *)aNotification
|
||||
{
|
||||
if( [[aNotification object] isEqual:window] )
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:PCEditorDidResignKeyNotification object:self];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -370,7 +370,7 @@ static BOOL isInitialised = NO;
|
|||
NSString *chars = [anEvent charactersIgnoringModifiers];
|
||||
int modifiers = [anEvent modifierFlags];
|
||||
|
||||
if(([chars lossyCString][0] == 's') && (modifiers & NSAlternateKeyMask))
|
||||
if(([chars lossyCString][0] == 's') && (modifiers & NSCommandKeyMask))
|
||||
{
|
||||
[editor saveFile];
|
||||
|
||||
|
|
|
@ -24,6 +24,9 @@
|
|||
$Id$
|
||||
*/
|
||||
|
||||
#ifndef _PCFILEMANAGER_H
|
||||
#define _PCFILEMANAGER_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface PCFileManager : NSObject
|
||||
|
@ -89,5 +92,4 @@
|
|||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
@ -24,6 +24,9 @@
|
|||
$Id$
|
||||
*/
|
||||
|
||||
#ifndef _PCPROJECT_H
|
||||
#define _PCPROJECT_H
|
||||
|
||||
#import <AppKit/AppKit.h>
|
||||
|
||||
#import "ProjectBuilder.h"
|
||||
|
@ -304,3 +307,5 @@ static NSString * const PCBuildTool = @"BUILDTOOL";
|
|||
- (void)windowWillClose:(NSNotification *)aNotification;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
|
|
|
@ -24,6 +24,9 @@
|
|||
$Id$
|
||||
*/
|
||||
|
||||
#ifndef _PCPROJECTBUILDER_H
|
||||
#define _PCPROJECTBUILDER_H
|
||||
|
||||
#import <AppKit/AppKit.h>
|
||||
|
||||
@class PCProject;
|
||||
|
@ -73,6 +76,4 @@
|
|||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
@ -24,6 +24,9 @@
|
|||
$Id$
|
||||
*/
|
||||
|
||||
#ifndef _PCPROJECTMANAGER_H
|
||||
#define _PCPROJECTMANAGER_H
|
||||
|
||||
#import <AppKit/AppKit.h>
|
||||
|
||||
#import "PCProject.h"
|
||||
|
@ -135,7 +138,6 @@
|
|||
- (BOOL)openFile:(NSString *)path;
|
||||
|
||||
- (BOOL)saveFile;
|
||||
- (BOOL)saveFileAs:(NSString *)path;
|
||||
- (BOOL)revertFile;
|
||||
- (BOOL)renameFileTo:(NSString *)path;
|
||||
- (BOOL)removeFilePermanently:(BOOL)yn;
|
||||
|
@ -171,4 +173,4 @@
|
|||
|
||||
extern NSString *ActiveProjectDidChangeNotification;
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
@ -520,10 +520,6 @@ NSString *ActiveProjectDidChangeNotification = @"ActiveProjectDidChange";
|
|||
return [activeProject saveFile];
|
||||
}
|
||||
|
||||
- (BOOL)saveFileAs:(NSString *)path
|
||||
{
|
||||
}
|
||||
|
||||
- (BOOL)revertFile
|
||||
{
|
||||
if (!activeProject)
|
||||
|
|
|
@ -24,6 +24,9 @@
|
|||
$Id$
|
||||
*/
|
||||
|
||||
#ifndef _PCSERVER_H
|
||||
#define _PCSERVER_H
|
||||
|
||||
#import <AppKit/AppKit.h>
|
||||
|
||||
#import "Server.h"
|
||||
|
@ -103,3 +106,5 @@ extern NSString *PCProjectBuildDidStopNotification;
|
|||
- (void)connectionDidDie:(NSNotification *)notif;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
|
|
|
@ -24,6 +24,9 @@
|
|||
$Id$
|
||||
*/
|
||||
|
||||
#ifndef _PREFERENCE_CONTOLLER_PROTO_H
|
||||
#define _PREFERENCE_CONTOLLER_PROTO_H
|
||||
|
||||
/*
|
||||
Description:
|
||||
|
||||
|
@ -45,3 +48,5 @@
|
|||
- (id)controller;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
|
|
|
@ -24,6 +24,9 @@
|
|||
$Id$
|
||||
*/
|
||||
|
||||
#ifndef _PROJECT_BUILDER_PROTO_H
|
||||
#define _PROJECT_BUILDER_PROTO_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@class PCProject;
|
||||
|
@ -35,3 +38,5 @@
|
|||
- (void)showInspectorForProject:(PCProject *)aProject;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
|
|
|
@ -24,56 +24,29 @@
|
|||
$Id$
|
||||
*/
|
||||
|
||||
#define PC_EXTERN extern
|
||||
#define PRIVATE_EXTERN __private_extern__
|
||||
|
||||
#define BUNDLE_PATH @"/LocalDeveloper/ProjectCenter/Bundles"
|
||||
|
||||
#define Editor @"Editor"
|
||||
#define Debugger @"Debugger"
|
||||
#define Compiler @"Compiler"
|
||||
#define PromptOnClean @"PromtOnClean"
|
||||
#define PromptOnQuit @"PromtOnQuit"
|
||||
#define SaveOnQuit @"SaveOnQuit"
|
||||
#define AutoSave @"AutoSave"
|
||||
#define KeepBackup @"KeepBackup"
|
||||
#define AutoSavePeriod @"AutoSavePeriod"
|
||||
#define RootBuildDirectory @"RootBuildDirectory"
|
||||
#define DeleteCacheWhenQuitting @"DeleteBuildCacheWhenQuitting"
|
||||
#define BundlePaths @"BundlePaths"
|
||||
#define SuccessSound @"SuccessSound"
|
||||
#define FailureSound @"FailureSound"
|
||||
#define ExternalEditor @"ExternalEditor"
|
||||
|
||||
#define PCAppDidInitNotification @"PCAppDidInit"
|
||||
#define PCAppWillTerminateNotification @"PCAppWillTerminate"
|
||||
|
||||
#define NIB_NOT_FOUND_EXCEPTION @"NibNotFoundException"
|
||||
#define UNKNOWN_PROJECT_TYPE_EXCEPTION @"UnknownProjectTypeException"
|
||||
#define NOT_A_PROJECT_TYPE_EXCEPTION @"NoProjectTypeCreatorException"
|
||||
#define PROJECT_CREATION_EXCEPTION @"ProjectCreationException"
|
||||
#define PROJECT_OPEN_FAILED_EXCEPTION @"ProjectOpenFailedException"
|
||||
#define PROJECT_SAVE_FAILED_EXCEPTION @"ProjectSaveFailedException"
|
||||
#define BUNDLE_MANAGER_EXCEPTION @"BundleManagerException"
|
||||
|
||||
#import "PCBundleLoader.h"
|
||||
#import "PCDataSource.h"
|
||||
#import "PCProjectManager.h"
|
||||
#import "PCServer.h"
|
||||
#import "PCProject.h"
|
||||
#import "PCProjectBuilder.h"
|
||||
#import "PCProjectDebugger.h"
|
||||
#import "PCFileManager.h"
|
||||
#import "PCBrowserController.h"
|
||||
#import "ProjectDebugger.h"
|
||||
#import "ProjectEditor.h"
|
||||
#import "ProjectType.h"
|
||||
#import "Server.h"
|
||||
#import "PreferenceController.h"
|
||||
#import "ProjectBuilder.h"
|
||||
#import "FileCreator.h"
|
||||
#import "PCEditorView.h"
|
||||
|
||||
#ifndef _PROJECTCENTER_H
|
||||
#define _PROJECTCENTER_H
|
||||
|
||||
#import <ProjectCenter/PCBundleLoader.h>
|
||||
#import <ProjectCenter/PCDataSource.h>
|
||||
#import <ProjectCenter/PCDefines.h>
|
||||
#import <ProjectCenter/PCProjectManager.h>
|
||||
#import <ProjectCenter/PCServer.h>
|
||||
#import <ProjectCenter/PCProject.h>
|
||||
#import <ProjectCenter/PCProjectBuilder.h>
|
||||
#import <ProjectCenter/PCProjectDebugger.h>
|
||||
#import <ProjectCenter/PCFileManager.h>
|
||||
#import <ProjectCenter/PCBrowserController.h>
|
||||
#import <ProjectCenter/ProjectDebugger.h>
|
||||
#import <ProjectCenter/ProjectEditor.h>
|
||||
#import <ProjectCenter/ProjectType.h>
|
||||
#import <ProjectCenter/Server.h>
|
||||
#import <ProjectCenter/PreferenceController.h>
|
||||
#import <ProjectCenter/ProjectBuilder.h>
|
||||
#import <ProjectCenter/FileCreator.h>
|
||||
#import <ProjectCenter/PCEditor.h>
|
||||
#import <ProjectCenter/PCEditorController.h>
|
||||
#import <ProjectCenter/PCEditorView.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -44,7 +44,8 @@
|
|||
Server.h,
|
||||
PCSplitView.h,
|
||||
PCEditor.h,
|
||||
PCEditorController.h
|
||||
PCEditorController.h,
|
||||
PCDefines.h
|
||||
);
|
||||
INSTALLDIR = "$(GNUSTEP_SYSTEM_ROOT)";
|
||||
LANGUAGE = English;
|
||||
|
|
|
@ -24,6 +24,9 @@
|
|||
$Id$
|
||||
*/
|
||||
|
||||
#ifndef _PROJECT_DEBUGGER_PROTO_H
|
||||
#define _PROJECT_DEBUGGER_PROTO_H
|
||||
|
||||
/*
|
||||
Description:
|
||||
|
||||
|
@ -39,3 +42,5 @@
|
|||
@protocol ProjectDebugger
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
|
|
|
@ -24,6 +24,9 @@
|
|||
$Id$
|
||||
*/
|
||||
|
||||
#ifndef _PROJECT_EDITOR_PROTO_H
|
||||
#define _PROJECT_EDITOR_PROTO_H
|
||||
|
||||
/*
|
||||
Description:
|
||||
|
||||
|
@ -54,3 +57,5 @@
|
|||
- (void)editorWillTerminate:(id<ProjectEditor>)editor;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
|
|
|
@ -24,6 +24,9 @@
|
|||
$Id$
|
||||
*/
|
||||
|
||||
#ifndef _SERVER_PROTO_H
|
||||
#define _SERVER_PROTO_H
|
||||
|
||||
#import <AppKit/AppKit.h>
|
||||
|
||||
#import "PCProject.h"
|
||||
|
@ -57,3 +60,5 @@
|
|||
- (BOOL)removeFileFromProject:(PCProject *)filePath;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue