2003-05-06 21:23:57 +00:00
|
|
|
/*
|
|
|
|
GNUstep ProjectCenter - http://www.gnustep.org
|
|
|
|
|
|
|
|
Copyright (C) 2001 Free Software Foundation
|
|
|
|
|
|
|
|
Author: Philippe C.D. Robert <probert@siggraph.org>
|
|
|
|
|
|
|
|
This file is part of GNUstep.
|
|
|
|
|
|
|
|
This application 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 application 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
|
|
|
|
Library General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public
|
|
|
|
License along with this library; if not, write to the Free
|
|
|
|
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
|
|
|
|
|
|
|
|
$Id$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <AppKit/AppKit.h>
|
|
|
|
|
|
|
|
#include <ProjectCenter/PCDefines.h>
|
|
|
|
#include"PCAppController.h"
|
|
|
|
|
|
|
|
void createMenu();
|
|
|
|
|
2003-07-10 16:00:49 +00:00
|
|
|
int main(int argc, const char **argv)
|
2003-05-06 21:23:57 +00:00
|
|
|
{
|
|
|
|
#ifdef GNUSTEP_BASE_VERSION
|
|
|
|
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
|
|
|
PCAppController *controller;
|
|
|
|
|
|
|
|
[NSApplication sharedApplication];
|
|
|
|
|
|
|
|
createMenu();
|
|
|
|
|
|
|
|
controller = [[PCAppController alloc] init];
|
|
|
|
[NSApp setDelegate:controller];
|
|
|
|
|
|
|
|
RELEASE(pool);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
return NSApplicationMain (argc, argv);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
createMenu()
|
|
|
|
{
|
|
|
|
NSMenu *menu;
|
|
|
|
NSMenu *info;
|
|
|
|
|
|
|
|
NSMenu *project;
|
2003-07-10 16:00:49 +00:00
|
|
|
#ifdef ENABLE_SUBPROJECTS
|
2003-05-06 21:23:57 +00:00
|
|
|
NSMenu *subprojects;
|
2003-07-10 16:00:49 +00:00
|
|
|
#endif
|
2003-05-06 21:23:57 +00:00
|
|
|
|
|
|
|
NSMenu *file;
|
2003-07-10 16:00:49 +00:00
|
|
|
#ifdef ENABLE_ALL_FILE_OPERATIONS
|
2003-05-06 21:23:57 +00:00
|
|
|
NSMenu *file_view;
|
2003-07-10 16:00:49 +00:00
|
|
|
#endif
|
2003-05-06 21:23:57 +00:00
|
|
|
|
|
|
|
NSMenu *edit;
|
|
|
|
NSMenu *edit_find;
|
|
|
|
NSMenu *edit_undo;
|
|
|
|
NSMenu *edit_indent;
|
|
|
|
|
|
|
|
NSMenu *format;
|
|
|
|
NSMenu *format_text;
|
|
|
|
|
|
|
|
NSMenu *tools;
|
|
|
|
NSMenu *tools_build;
|
2003-07-10 16:00:49 +00:00
|
|
|
#ifdef ENABLE_PROJECTFIND
|
2003-05-06 21:23:57 +00:00
|
|
|
NSMenu *tools_find;
|
2003-07-10 16:00:49 +00:00
|
|
|
#endif
|
|
|
|
#ifdef ENABLE_LOADEDFILES
|
2003-05-06 21:23:57 +00:00
|
|
|
NSMenu *tools_files;
|
2003-07-10 16:00:49 +00:00
|
|
|
#endif
|
2003-05-06 21:23:57 +00:00
|
|
|
NSMenu *tools_launcher;
|
2003-07-10 16:00:49 +00:00
|
|
|
#ifdef ENABLE_INDEXER
|
2003-05-06 21:23:57 +00:00
|
|
|
NSMenu *tools_indexer;
|
2003-07-10 16:00:49 +00:00
|
|
|
#endif
|
2003-05-06 21:23:57 +00:00
|
|
|
|
|
|
|
NSMenu *windows;
|
|
|
|
NSMenu *services;
|
|
|
|
|
|
|
|
SEL action = @selector(method:);
|
|
|
|
|
2003-07-10 16:00:49 +00:00
|
|
|
menu = [[NSMenu alloc] initWithTitle: @"ProjectCenter"];
|
2003-05-06 21:23:57 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* The main menu
|
|
|
|
*/
|
|
|
|
|
|
|
|
[menu addItemWithTitle:@"Info" action:action keyEquivalent:@""];
|
|
|
|
[menu addItemWithTitle:@"Project" action:action keyEquivalent:@""];
|
|
|
|
[menu addItemWithTitle:@"File" action:action keyEquivalent:@""];
|
|
|
|
[menu addItemWithTitle:@"Edit" action:action keyEquivalent:@""];
|
|
|
|
[menu addItemWithTitle:@"Format" action:action keyEquivalent:@""];
|
|
|
|
[menu addItemWithTitle:@"Tools" action:action keyEquivalent:@""];
|
|
|
|
[menu addItemWithTitle:@"Windows" action:action keyEquivalent:@""];
|
|
|
|
[menu addItemWithTitle:@"Print..." action:action keyEquivalent:@"p"];
|
|
|
|
[menu addItemWithTitle:@"Services" action:action keyEquivalent:@""];
|
|
|
|
[menu addItemWithTitle:@"Hide" action:@selector(hide:) keyEquivalent:@"h"];
|
|
|
|
[menu addItemWithTitle:@"Quit" action:@selector(terminate:)
|
|
|
|
keyEquivalent:@"q"];
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Info submenu
|
|
|
|
*/
|
|
|
|
|
|
|
|
info = [[[NSMenu alloc] init] autorelease];
|
|
|
|
[menu setSubmenu:info forItem:[menu itemWithTitle:@"Info"]];
|
|
|
|
[info addItemWithTitle:@"Info Panel..."
|
|
|
|
action:@selector(showInfoPanel:)
|
|
|
|
keyEquivalent:@""];
|
|
|
|
[info addItemWithTitle:@"Preferences..."
|
|
|
|
action:@selector(showPrefWindow:)
|
|
|
|
keyEquivalent:@""];
|
|
|
|
[info addItemWithTitle:@"Help"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@"?"];
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Project submenu
|
|
|
|
*/
|
|
|
|
|
|
|
|
project = [[[NSMenu alloc] init] autorelease];
|
|
|
|
[menu setSubmenu:project forItem:[menu itemWithTitle:@"Project"]];
|
|
|
|
[project addItemWithTitle:@"Open..."
|
2003-05-16 14:06:51 +00:00
|
|
|
action:@selector(projectOpen:)
|
2003-05-06 21:23:57 +00:00
|
|
|
keyEquivalent:@"O"];
|
|
|
|
[project addItemWithTitle:@"New..."
|
2003-05-16 14:06:51 +00:00
|
|
|
action:@selector(projectNew:)
|
2003-05-06 21:23:57 +00:00
|
|
|
keyEquivalent:@"N"];
|
|
|
|
[project addItemWithTitle:@"Save"
|
2003-05-16 14:06:51 +00:00
|
|
|
action:@selector(projectSave:)
|
2003-05-06 21:23:57 +00:00
|
|
|
keyEquivalent:@"S"];
|
|
|
|
[project addItemWithTitle:@"Save As..."
|
2003-05-16 14:06:51 +00:00
|
|
|
action:@selector(projectSaveAs:)
|
2003-05-06 21:23:57 +00:00
|
|
|
keyEquivalent:@""];
|
|
|
|
[project addItemWithTitle:@"Add Files..."
|
2003-05-16 14:06:51 +00:00
|
|
|
action:@selector(projectAddFiles:)
|
2003-05-06 21:23:57 +00:00
|
|
|
keyEquivalent:@"A"];
|
|
|
|
[project addItemWithTitle:@"Save Files..."
|
2003-05-16 14:06:51 +00:00
|
|
|
action:@selector(projectSaveFiles:)
|
2003-05-06 21:23:57 +00:00
|
|
|
keyEquivalent:@"Q"];
|
|
|
|
[project addItemWithTitle:@"Remove Files..."
|
2003-05-16 14:06:51 +00:00
|
|
|
action:@selector(projectRemoveFiles:)
|
2003-05-06 21:23:57 +00:00
|
|
|
keyEquivalent:@"r"];
|
2003-07-10 16:00:49 +00:00
|
|
|
#ifdef ENABLE_SUBPROJECTS
|
2003-05-06 21:23:57 +00:00
|
|
|
[project addItemWithTitle:@"Subprojects"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@""];
|
2003-07-10 16:00:49 +00:00
|
|
|
#endif
|
2003-05-06 21:23:57 +00:00
|
|
|
[project addItemWithTitle:@"Close"
|
2003-05-16 14:06:51 +00:00
|
|
|
action:@selector(projectClose:)
|
2003-05-06 21:23:57 +00:00
|
|
|
keyEquivalent:@""];
|
|
|
|
|
2003-07-10 16:00:49 +00:00
|
|
|
#ifdef ENABLE_SUBPROJECTS
|
|
|
|
|
2003-05-06 21:23:57 +00:00
|
|
|
subprojects = [[[NSMenu alloc] init] autorelease];
|
|
|
|
[project setSubmenu:subprojects
|
|
|
|
forItem:[project itemWithTitle:@"Subprojects"]];
|
|
|
|
[subprojects addItemWithTitle:@"New..."
|
|
|
|
action:@selector(newSubproject:)
|
|
|
|
keyEquivalent:@""];
|
|
|
|
[subprojects addItemWithTitle:@"Add..."
|
|
|
|
action:@selector(addSubproject:)
|
|
|
|
keyEquivalent:@""];
|
|
|
|
[subprojects addItemWithTitle:@"Remove..."
|
|
|
|
action:@selector(removeSubproject:)
|
|
|
|
keyEquivalent:@""];
|
|
|
|
|
2003-07-10 16:00:49 +00:00
|
|
|
#endif
|
|
|
|
|
2003-05-06 21:23:57 +00:00
|
|
|
/*
|
|
|
|
* File submenu
|
|
|
|
*/
|
|
|
|
file = [[[NSMenu alloc] init] autorelease];
|
|
|
|
[menu setSubmenu:file forItem:[menu itemWithTitle:@"File"]];
|
|
|
|
[file addItemWithTitle:@"Open..."
|
2003-05-16 14:06:51 +00:00
|
|
|
action:@selector(fileOpen:)
|
2003-05-06 21:23:57 +00:00
|
|
|
keyEquivalent:@"o"];
|
|
|
|
[file addItemWithTitle:@"New in Project"
|
2003-05-16 14:06:51 +00:00
|
|
|
action:@selector(fileNew:)
|
2003-05-06 21:23:57 +00:00
|
|
|
keyEquivalent:@"n"];
|
|
|
|
[file addItemWithTitle:@"Save"
|
2003-05-16 14:06:51 +00:00
|
|
|
action:@selector(fileSave:)
|
2003-05-06 21:23:57 +00:00
|
|
|
keyEquivalent:@"s"];
|
|
|
|
[file addItemWithTitle:@"Save As..."
|
2003-05-16 14:06:51 +00:00
|
|
|
action:@selector(fileSaveAs:)
|
2003-05-06 21:23:57 +00:00
|
|
|
keyEquivalent:@""];
|
|
|
|
[file addItemWithTitle:@"Save To..."
|
2003-05-16 14:06:51 +00:00
|
|
|
action:@selector(fileSaveTo:)
|
2003-05-06 21:23:57 +00:00
|
|
|
keyEquivalent:@""];
|
|
|
|
[file addItemWithTitle:@"Revert to Saved"
|
2003-05-23 09:11:07 +00:00
|
|
|
action:@selector(fileRevertToSaved:)
|
2003-05-06 21:23:57 +00:00
|
|
|
keyEquivalent:@"u"];
|
|
|
|
[file addItemWithTitle:@"Close"
|
2003-05-16 14:06:51 +00:00
|
|
|
action:@selector(fileClose:)
|
2003-05-06 21:23:57 +00:00
|
|
|
keyEquivalent:@"W"];
|
2003-07-10 16:00:49 +00:00
|
|
|
#ifdef ENABLE_ALL_FILE_OPERATIONS
|
2003-05-06 21:23:57 +00:00
|
|
|
[file addItemWithTitle:@"View"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@""];
|
|
|
|
[file addItemWithTitle:@"Open Quickly..."
|
2003-05-23 09:11:07 +00:00
|
|
|
action:@selector(fileOpenQuickly:)
|
2003-05-06 21:23:57 +00:00
|
|
|
keyEquivalent:@"D"];
|
|
|
|
[file addItemWithTitle:@"Rename"
|
2003-05-16 14:06:51 +00:00
|
|
|
action:@selector(fileRename:)
|
2003-05-06 21:23:57 +00:00
|
|
|
keyEquivalent:@""];
|
|
|
|
[file addItemWithTitle:@"New Untitled"
|
2003-05-23 09:11:07 +00:00
|
|
|
action:@selector(fileNewUntitled:)
|
2003-05-06 21:23:57 +00:00
|
|
|
keyEquivalent:@""];
|
|
|
|
|
|
|
|
file_view = [[[NSMenu alloc] init] autorelease];
|
|
|
|
[file setSubmenu:file_view
|
|
|
|
forItem:[file itemWithTitle:@"View"]];
|
|
|
|
[file_view addItemWithTitle:@"Split"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@"2"];
|
|
|
|
[file_view addItemWithTitle:@"Maximize"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@"1"];
|
|
|
|
[file_view addItemWithTitle:@"Tear Off"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@"T"];
|
2003-07-10 16:00:49 +00:00
|
|
|
#endif
|
2003-05-06 21:23:57 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Edit submenu
|
|
|
|
*/
|
|
|
|
|
|
|
|
edit = [[[NSMenu alloc] init] autorelease];
|
|
|
|
[menu setSubmenu:edit forItem:[menu itemWithTitle:@"Edit"]];
|
|
|
|
[edit addItemWithTitle:@"Cut"
|
|
|
|
action:@selector(cut:)
|
|
|
|
keyEquivalent:@"x"];
|
|
|
|
[edit addItemWithTitle:@"Copy"
|
|
|
|
action:@selector(copy:)
|
|
|
|
keyEquivalent:@"c"];
|
|
|
|
[edit addItemWithTitle:@"Paste"
|
|
|
|
action:@selector(paste:)
|
|
|
|
keyEquivalent:@"v"];
|
|
|
|
[edit addItemWithTitle:@"Delete"
|
|
|
|
action:@selector(delete:)
|
|
|
|
keyEquivalent:@""];
|
|
|
|
[edit addItemWithTitle:@"Select All"
|
|
|
|
action:@selector(selectAll:)
|
|
|
|
keyEquivalent:@"a"];
|
|
|
|
[edit addItemWithTitle:@"Find"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@""];
|
|
|
|
[edit addItemWithTitle:@"Undo"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@""];
|
|
|
|
[edit addItemWithTitle:@"Indentation"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@""];
|
|
|
|
[edit addItemWithTitle:@"Spelling..."
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@""];
|
|
|
|
[edit addItemWithTitle:@"Check Spelling"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@";"];
|
|
|
|
|
|
|
|
// Find
|
|
|
|
edit_find = [[[NSMenu alloc] init] autorelease];
|
|
|
|
[edit setSubmenu:edit_find
|
|
|
|
forItem:[edit itemWithTitle:@"Find"]];
|
|
|
|
[edit_find addItemWithTitle:@"Find Panel..."
|
2003-05-16 14:06:51 +00:00
|
|
|
action:@selector(findShowPanel:)
|
2003-05-06 21:23:57 +00:00
|
|
|
keyEquivalent:@"f"];
|
|
|
|
[edit_find addItemWithTitle:@"Find Next"
|
|
|
|
action:@selector(findNext:)
|
|
|
|
keyEquivalent:@"g"];
|
2003-05-08 08:05:42 +00:00
|
|
|
[edit_find addItemWithTitle:@"Find Previous"
|
2003-05-06 21:23:57 +00:00
|
|
|
action:@selector(findPrevious:)
|
|
|
|
keyEquivalent:@"d"];
|
|
|
|
[edit_find addItemWithTitle:@"Enter Selection"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@"e"];
|
|
|
|
[edit_find addItemWithTitle:@"Jump to Selection"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@"j"];
|
|
|
|
[edit_find addItemWithTitle:@"Line Number..."
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@"I"];
|
|
|
|
[edit_find addItemWithTitle:@"Man Page"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@"M"];
|
|
|
|
|
|
|
|
// Undo
|
|
|
|
edit_undo = [[[NSMenu alloc] init] autorelease];
|
|
|
|
[edit setSubmenu:edit_undo
|
|
|
|
forItem:[edit itemWithTitle:@"Undo"]];
|
|
|
|
[edit_undo addItemWithTitle:@"Undo"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@"z"];
|
|
|
|
[edit_undo addItemWithTitle:@"Redo"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@"Z"];
|
|
|
|
[edit_undo addItemWithTitle:@"Undo Region"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@""];
|
|
|
|
|
|
|
|
// Indentation
|
|
|
|
edit_indent = [[[NSMenu alloc] init] autorelease];
|
|
|
|
[edit setSubmenu:edit_indent
|
|
|
|
forItem:[edit itemWithTitle:@"Indentation"]];
|
|
|
|
[edit_indent addItemWithTitle:@"Indent"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@"i"];
|
|
|
|
[edit_indent addItemWithTitle:@"Shift Left"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@"["];
|
|
|
|
[edit_indent addItemWithTitle:@"Shift Right"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@"]"];
|
|
|
|
[edit_indent addItemWithTitle:@"Compress Whitesapce"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@"{"];
|
|
|
|
[edit_indent addItemWithTitle:@"Expand Message Expression"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@"}"];
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Format submenu
|
|
|
|
*/
|
|
|
|
format = [[[NSMenu alloc] init] autorelease];
|
|
|
|
[menu setSubmenu:format
|
|
|
|
forItem:[menu itemWithTitle:@"Format"]];
|
|
|
|
[format addItemWithTitle:@"Font"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@""];
|
|
|
|
[format addItemWithTitle:@"Text"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@""];
|
|
|
|
[format addItemWithTitle:@"Make Rich Text"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@"R"];
|
|
|
|
[format addItemWithTitle:@"Show All Characters"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@""];
|
|
|
|
[format addItemWithTitle:@"Page Layout..."
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@"P"];
|
|
|
|
|
|
|
|
// Font
|
|
|
|
[format setSubmenu:[[NSFontManager sharedFontManager] fontMenu: YES]
|
|
|
|
forItem:[format itemWithTitle:@"Font"]];
|
|
|
|
// Text
|
|
|
|
format_text = [[[NSMenu alloc] init] autorelease];
|
|
|
|
[format setSubmenu:format_text
|
|
|
|
forItem:[format itemWithTitle:@"Text"]];
|
|
|
|
[format_text addItemWithTitle:@"Align Left"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@""];
|
|
|
|
[format_text addItemWithTitle:@"Center"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@""];
|
|
|
|
[format_text addItemWithTitle:@"Align Right"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@""];
|
|
|
|
[format_text addItemWithTitle:@"Show Ruler"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@""];
|
|
|
|
[format_text addItemWithTitle:@"Copy Ruler"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@""];
|
|
|
|
[format_text addItemWithTitle:@"Paste Ruler"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@""];
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Tools submenu
|
|
|
|
*/
|
|
|
|
|
|
|
|
tools = [[[NSMenu alloc] init] autorelease];
|
|
|
|
[menu setSubmenu:tools forItem:[menu itemWithTitle:@"Tools"]];
|
2003-07-10 16:00:49 +00:00
|
|
|
// probert: either use a NSToolbar or remove that!
|
|
|
|
#ifdef ENABLE_TOOLBAR
|
2003-05-06 21:23:57 +00:00
|
|
|
[tools addItemWithTitle:@"Hide Tool Bar"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@""];
|
2003-07-10 16:00:49 +00:00
|
|
|
#endif
|
2003-05-06 21:23:57 +00:00
|
|
|
[tools addItemWithTitle:@"Inspector..."
|
|
|
|
action:@selector(showInspector:)
|
|
|
|
keyEquivalent:@""];
|
2003-07-10 16:00:49 +00:00
|
|
|
#ifdef ENABLE_LOADEDPROJECTS
|
2003-05-06 21:23:57 +00:00
|
|
|
[tools addItemWithTitle:@"Loaded Projects..."
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@""];
|
2003-07-10 16:00:49 +00:00
|
|
|
#endif
|
2003-05-06 21:23:57 +00:00
|
|
|
[tools addItemWithTitle:@"Project Build"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@""];
|
2003-07-10 16:00:49 +00:00
|
|
|
#ifdef ENABLE_PROJECTFIND
|
2003-05-06 21:23:57 +00:00
|
|
|
[tools addItemWithTitle:@"Project Find"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@""];
|
2003-07-10 16:00:49 +00:00
|
|
|
#endif
|
|
|
|
#ifdef ENABLE_LOADEDFILES
|
2003-05-06 21:23:57 +00:00
|
|
|
[tools addItemWithTitle:@"Loaded Files"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@""];
|
2003-07-10 16:00:49 +00:00
|
|
|
#endif
|
2003-05-06 21:23:57 +00:00
|
|
|
[tools addItemWithTitle:@"Launcher"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@""];
|
2003-07-10 16:00:49 +00:00
|
|
|
#ifdef ENABLE_INDEXER
|
2003-05-06 21:23:57 +00:00
|
|
|
[tools addItemWithTitle:@"Indexer"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@""];
|
2003-07-10 16:00:49 +00:00
|
|
|
#endif
|
2003-05-06 21:23:57 +00:00
|
|
|
|
|
|
|
// Project Build
|
|
|
|
tools_build = [[[NSMenu alloc] init] autorelease];
|
|
|
|
[tools setSubmenu:tools_build
|
|
|
|
forItem:[tools itemWithTitle:@"Project Build"]];
|
|
|
|
[tools_build addItemWithTitle:@"Show Panel..."
|
|
|
|
action:@selector(showBuildPanel:)
|
|
|
|
keyEquivalent:@""];
|
|
|
|
[tools_build addItemWithTitle:@"Build"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@"B"];
|
|
|
|
[tools_build addItemWithTitle:@"Stop Build"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@"/"];
|
|
|
|
[tools_build addItemWithTitle:@"Clean"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@""];
|
|
|
|
[tools_build addItemWithTitle:@"Next Error"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@">"];
|
|
|
|
[tools_build addItemWithTitle:@"Previous Error"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@"<"];
|
|
|
|
|
|
|
|
// Project Find
|
2003-07-10 16:00:49 +00:00
|
|
|
#ifdef ENABLE_PROJECTFIND
|
2003-05-06 21:23:57 +00:00
|
|
|
tools_find = [[[NSMenu alloc] init] autorelease];
|
|
|
|
[tools setSubmenu:tools_find
|
|
|
|
forItem:[tools itemWithTitle:@"Project Find"]];
|
|
|
|
[tools_find addItemWithTitle:@"Show Panel..."
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@"F"];
|
|
|
|
[tools_find addItemWithTitle:@"Find References"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@"0"];
|
|
|
|
[tools_find addItemWithTitle:@"Find Definitions"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@"9"];
|
|
|
|
[tools_find addItemWithTitle:@"Find Text"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@"8"];
|
|
|
|
[tools_find addItemWithTitle:@"Find Regular Expr"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@"7"];
|
|
|
|
[tools_find addItemWithTitle:@"Next match"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@""];
|
|
|
|
[tools_find addItemWithTitle:@"Previuos match"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@""];
|
2003-07-10 16:00:49 +00:00
|
|
|
#endif
|
2003-05-06 21:23:57 +00:00
|
|
|
|
|
|
|
// Loaded Files
|
2003-07-10 16:00:49 +00:00
|
|
|
#ifdef ENABLE_LOADEDFILES
|
2003-05-06 21:23:57 +00:00
|
|
|
tools_files = [[[NSMenu alloc] init] autorelease];
|
|
|
|
[tools setSubmenu:tools_files
|
|
|
|
forItem:[tools itemWithTitle:@"Loaded Files"]];
|
|
|
|
[tools_files addItemWithTitle:@"Show Panel..."
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@"L"];
|
|
|
|
[tools_files addItemWithTitle:@"Sort by Time Viewed"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@""];
|
|
|
|
[tools_files addItemWithTitle:@"Sort by Name"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@""];
|
|
|
|
[tools_files addItemWithTitle:@"Next File"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@"+"];
|
|
|
|
[tools_files addItemWithTitle:@"Previuos File"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@"_"];
|
2003-07-10 16:00:49 +00:00
|
|
|
#endif
|
|
|
|
|
2003-05-06 21:23:57 +00:00
|
|
|
// Launcher
|
|
|
|
tools_launcher = [[[NSMenu alloc] init] autorelease];
|
|
|
|
[tools setSubmenu:tools_launcher
|
|
|
|
forItem:[tools itemWithTitle:@"Launcher"]];
|
|
|
|
[tools_launcher addItemWithTitle:@"Show Panel..."
|
|
|
|
action:@selector(showRunPanel:)
|
|
|
|
keyEquivalent:@""];
|
|
|
|
[tools_launcher addItemWithTitle:@"Run"
|
|
|
|
action:@selector(runTarget:)
|
|
|
|
keyEquivalent:@""];
|
|
|
|
[tools_launcher addItemWithTitle:@"Debug"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@""];
|
2003-07-10 16:00:49 +00:00
|
|
|
|
|
|
|
#ifdef ENABLE_INDEXER
|
2003-05-06 21:23:57 +00:00
|
|
|
// Indexer
|
|
|
|
tools_indexer = [[[NSMenu alloc] init] autorelease];
|
|
|
|
[tools setSubmenu:tools_indexer
|
|
|
|
forItem:[tools itemWithTitle:@"Indexer"]];
|
|
|
|
[tools_indexer addItemWithTitle:@"Show Panel..."
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@""];
|
|
|
|
[tools_indexer addItemWithTitle:@"Purge Indices"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@""];
|
|
|
|
[tools_indexer addItemWithTitle:@"Index Subproject"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@"|"];
|
|
|
|
[tools_indexer addItemWithTitle:@"Index File"
|
|
|
|
action:action
|
|
|
|
keyEquivalent:@"*"];
|
2003-07-10 16:00:49 +00:00
|
|
|
#endif
|
2003-05-06 21:23:57 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Windows submenu
|
|
|
|
*/
|
|
|
|
|
|
|
|
windows = [[[NSMenu alloc] init] autorelease];
|
|
|
|
[menu setSubmenu:windows forItem:[menu itemWithTitle:@"Windows"]];
|
|
|
|
[windows addItemWithTitle:@"Arrange in Front"
|
|
|
|
action:@selector(arrangeInFront:)
|
|
|
|
keyEquivalent:@""];
|
|
|
|
[windows addItemWithTitle:@"Miniaturize Window"
|
|
|
|
action:@selector(performMiniaturize:)
|
|
|
|
keyEquivalent:@"m"];
|
|
|
|
[windows addItemWithTitle:@"Close Window"
|
|
|
|
action:@selector(performClose:)
|
|
|
|
keyEquivalent:@"w"];
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Services submenu
|
|
|
|
*/
|
|
|
|
|
|
|
|
services = [[[NSMenu alloc] init] autorelease];
|
|
|
|
[menu setSubmenu:services forItem:[menu itemWithTitle:@"Services"]];
|
|
|
|
|
|
|
|
[[NSApplication sharedApplication] setWindowsMenu: windows];
|
|
|
|
[[NSApplication sharedApplication] setServicesMenu: services];
|
|
|
|
[[NSApplication sharedApplication] setMainMenu:menu];
|
|
|
|
}
|
|
|
|
|