Disabling unused menu entries using defines.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/branches/RELEASE_0_3_5@17139 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Philippe C.D. Robert 2003-07-05 16:30:28 +00:00
parent e0a9d0c368
commit e507242ccc
2 changed files with 35 additions and 2 deletions

View file

@ -10,6 +10,7 @@
PCPrefController.m, PCPrefController.h
* Extracting UI creation into category: PCPrefController+UInterface.h,
PCPrefController+UInterface.m, PCPrefController.m, PCPrefController.h
* Disabling unused menu entries using defines: ProjectCenter_main.m
2003-07-04 Philippe C.D. Robert <probert@siggraph.org>

View file

@ -31,8 +31,7 @@
void createMenu();
int
main(int argc, const char **argv)
int main(int argc, const char **argv)
{
#ifdef GNUSTEP_BASE_VERSION
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
@ -58,7 +57,9 @@ createMenu()
NSMenu *info;
NSMenu *project;
#ifdef ENABLE_SUBPROJECTS
NSMenu *subprojects;
#endif
NSMenu *file;
NSMenu *file_view;
@ -73,10 +74,16 @@ createMenu()
NSMenu *tools;
NSMenu *tools_build;
#ifdef ENABLE_PROJECTFIND
NSMenu *tools_find;
#endif
#ifdef ENABLE_LOADEDFILES
NSMenu *tools_files;
#endif
NSMenu *tools_launcher;
#ifdef ENABLE_INDEXER
NSMenu *tools_indexer;
#endif
NSMenu *windows;
NSMenu *services;
@ -145,13 +152,17 @@ createMenu()
[project addItemWithTitle:@"Remove Files..."
action:@selector(projectRemoveFiles:)
keyEquivalent:@"r"];
#ifdef ENABLE_SUBPROJECTS
[project addItemWithTitle:@"Subprojects"
action:action
keyEquivalent:@""];
#endif
[project addItemWithTitle:@"Close"
action:@selector(projectClose:)
keyEquivalent:@""];
#ifdef ENABLE_SUBPROJECTS
subprojects = [[[NSMenu alloc] init] autorelease];
[project setSubmenu:subprojects
forItem:[project itemWithTitle:@"Subprojects"]];
@ -165,6 +176,8 @@ createMenu()
action:@selector(removeSubproject:)
keyEquivalent:@""];
#endif
/*
* File submenu
*/
@ -368,30 +381,41 @@ createMenu()
tools = [[[NSMenu alloc] init] autorelease];
[menu setSubmenu:tools forItem:[menu itemWithTitle:@"Tools"]];
// probert: either use a NSToolbar or remove that!
#ifdef ENABLE_TOOLBAR
[tools addItemWithTitle:@"Hide Tool Bar"
action:action
keyEquivalent:@""];
#endif
[tools addItemWithTitle:@"Inspector..."
action:@selector(showInspector:)
keyEquivalent:@""];
#ifdef ENABLE_LOADEDPROJECTS
[tools addItemWithTitle:@"Loaded Projects..."
action:action
keyEquivalent:@""];
#endif
[tools addItemWithTitle:@"Project Build"
action:action
keyEquivalent:@""];
#ifdef ENABLE_PROJECTFIND
[tools addItemWithTitle:@"Project Find"
action:action
keyEquivalent:@""];
#endif
#ifdef ENABLE_LOADEDFILES
[tools addItemWithTitle:@"Loaded Files"
action:action
keyEquivalent:@""];
#endif
[tools addItemWithTitle:@"Launcher"
action:action
keyEquivalent:@""];
#ifdef ENABLE_INDEXER
[tools addItemWithTitle:@"Indexer"
action:action
keyEquivalent:@""];
#endif
// Project Build
tools_build = [[[NSMenu alloc] init] autorelease];
@ -417,6 +441,7 @@ createMenu()
keyEquivalent:@"<"];
// Project Find
#ifdef ENABLE_PROJECTFIND
tools_find = [[[NSMenu alloc] init] autorelease];
[tools setSubmenu:tools_find
forItem:[tools itemWithTitle:@"Project Find"]];
@ -441,8 +466,10 @@ createMenu()
[tools_find addItemWithTitle:@"Previuos match"
action:action
keyEquivalent:@""];
#endif
// Loaded Files
#ifdef ENABLE_LOADEDFILES
tools_files = [[[NSMenu alloc] init] autorelease];
[tools setSubmenu:tools_files
forItem:[tools itemWithTitle:@"Loaded Files"]];
@ -461,6 +488,8 @@ createMenu()
[tools_files addItemWithTitle:@"Previuos File"
action:action
keyEquivalent:@"_"];
#endif
// Launcher
tools_launcher = [[[NSMenu alloc] init] autorelease];
[tools setSubmenu:tools_launcher
@ -474,6 +503,8 @@ createMenu()
[tools_launcher addItemWithTitle:@"Debug"
action:action
keyEquivalent:@""];
#ifdef ENABLE_INDEXER
// Indexer
tools_indexer = [[[NSMenu alloc] init] autorelease];
[tools setSubmenu:tools_indexer
@ -490,6 +521,7 @@ createMenu()
[tools_indexer addItemWithTitle:@"Index File"
action:action
keyEquivalent:@"*"];
#endif
/*
* Windows submenu