some minor Forge updates.

This commit is contained in:
Jeff Teunissen 2002-01-14 15:06:00 +00:00
parent 9d59d953bd
commit 2e3c1a55c6
3 changed files with 42 additions and 56 deletions

View file

@ -129,14 +129,11 @@ static const char rcsid[] =
*/ */
- (void) applicationWillFinishLaunching: (NSNotification *) not; - (void) applicationWillFinishLaunching: (NSNotification *) not;
{ {
#if 0 NSMenu *menu = [NSApp mainMenu];
NSMenu *menu = [[[NSMenu alloc] init] autorelease];
NSMenu *info; NSMenu *info;
NSMenu *project; NSMenu *project;
NSMenu *file; NSMenu *file;
NSMenu *edit; NSMenu *edit;
// NSMenu *bsp;
// NSMenu *brush;
NSMenu *windows; NSMenu *windows;
NSMenu *services; NSMenu *services;
@ -153,6 +150,7 @@ static const char rcsid[] =
/* /*
Info Info
*/ */
NSDebugLog (@"Info");
info = [[[NSMenu alloc] init] autorelease]; info = [[[NSMenu alloc] init] autorelease];
[menu setSubmenu: info forItem: [menu itemWithTitle: _(@"Info")]]; [menu setSubmenu: info forItem: [menu itemWithTitle: _(@"Info")]];
@ -169,21 +167,22 @@ static const char rcsid[] =
/* /*
Project Project
*/ */
NSDebugLog (@"Project");
project = [[[NSMenu alloc] init] autorelease]; project = [[[NSMenu alloc] init] autorelease];
[menu setSubmenu: project forItem: [menu itemWithTitle: _(@"Project")]]; [menu setSubmenu: project forItem: [menu itemWithTitle: _(@"Project")]];
[project addItemWithTitle: _(@"Open...") [project addItemWithTitle: _(@"Open...")
action: @selector (openProject:) action: @selector (openProject:)
keyEquivalent: @"~o"]; keyEquivalent: @"o"];
[project addItemWithTitle: _(@"New") [project addItemWithTitle: _(@"New")
action: @selector (createNewProject:) action: @selector (createNewProject:)
keyEquivalent: @"~n"]; keyEquivalent: @"n"];
[project addItemWithTitle: _(@"Save...") [project addItemWithTitle: _(@"Save...")
action: @selector (saveProject:) action: @selector (saveProject:)
keyEquivalent: @"~s"]; keyEquivalent: @"s"];
[project addItemWithTitle: _(@"Save As...") [project addItemWithTitle: _(@"Save As...")
action: @selector (saveProjectAs:) action: @selector (saveProjectAs:)
keyEquivalent: @"~S"]; keyEquivalent: @"S"];
[project addItemWithTitle: _(@"Close") [project addItemWithTitle: _(@"Close")
action: @selector (closeProject:) action: @selector (closeProject:)
keyEquivalent: @""]; keyEquivalent: @""];
@ -191,24 +190,19 @@ static const char rcsid[] =
/* /*
File File
*/ */
NSDebugLog (@"File");
file = [[[NSMenu alloc] init] autorelease]; file = [[[NSMenu alloc] init] autorelease];
[menu setSubmenu: file forItem: [menu itemWithTitle: _(@"File")]]; [menu setSubmenu: file forItem: [menu itemWithTitle: _(@"File")]];
[file addItemWithTitle: _(@"Open...") [file addItemWithTitle: _(@"Add File...")
action: @selector (open:) action: @selector (addFileToProject:)
keyEquivalent: @"o"]; keyEquivalent: @"a"];
[file addItemWithTitle: _(@"New") [file addItemWithTitle: _(@"Add New File...")
action: @selector (createNew:) action: @selector (addNewFileToProject:)
keyEquivalent: @"n"]; keyEquivalent: @"N"];
[file addItemWithTitle: _(@"Save...") [file addItemWithTitle: _(@"Save File")
action: @selector (save:) action: @selector (saveFile:)
keyEquivalent: @"s"]; keyEquivalent: @"f"];
[file addItemWithTitle: _(@"Save As...")
action: @selector (saveAs:)
keyEquivalent: @"S"];
[file addItemWithTitle: _(@"Save All")
action: @selector (saveAll:)
keyEquivalent: @""];
[file addItemWithTitle: _(@"Revert to Saved") [file addItemWithTitle: _(@"Revert to Saved")
action: @selector (revertToSaved:) action: @selector (revertToSaved:)
keyEquivalent: @""]; keyEquivalent: @""];
@ -219,6 +213,7 @@ static const char rcsid[] =
/* /*
Edit Edit
*/ */
NSDebugLog (@"Edit");
edit = [[[NSMenu alloc] init] autorelease]; edit = [[[NSMenu alloc] init] autorelease];
[menu setSubmenu: edit forItem: [menu itemWithTitle: _(@"Edit")]]; [menu setSubmenu: edit forItem: [menu itemWithTitle: _(@"Edit")]];
@ -247,22 +242,30 @@ static const char rcsid[] =
/* /*
Windows Windows
*/ */
NSDebugLog (@"Windows");
windows = [[[NSMenu alloc] init] autorelease]; windows = [[[NSMenu alloc] init] autorelease];
[windows addItemWithTitle: _(@"Close Window")
action: @selector (performClose:)
keyEquivalent: @"w"];
[windows addItemWithTitle: _(@"Miniaturize Window")
action: @selector (performMiniaturize:)
keyEquivalent: @"m"];
[windows addItemWithTitle: _(@"Arrange in Front")
action: @selector (arrangeInFront:)
keyEquivalent: @""];
[NSApp setWindowsMenu: windows]; [NSApp setWindowsMenu: windows];
[menu setSubmenu: windows forItem: [menu itemWithTitle: _(@"Windows")]];
/* /*
Services Services
*/ */
NSDebugLog (@"Services");
services = [[[NSMenu alloc] init] autorelease]; services = [[[NSMenu alloc] init] autorelease];
[NSApp setServicesMenu: services]; [NSApp setServicesMenu: services];
[menu setSubmenu: services forItem: [menu itemWithTitle: _(@"Services")]]; [menu setSubmenu: services forItem: [menu itemWithTitle: _(@"Services")]];
[NSApp setMainMenu: menu];
#endif
{ // yeah, yeah, shaddap { // yeah, yeah, shaddap
id controller = [[BundleController alloc] init]; id controller = [[BundleController alloc] init];
@ -274,7 +277,7 @@ static const char rcsid[] =
/* /*
applicationWillTerminate: applicationWillTerminate:
Sort of like SIGQUIT. App is about to die, but has a chance to clean up We're about to die, but AppKit is giving us a chance to clean up
*/ */
- (void) applicationWillTerminate: (NSNotification *) not; - (void) applicationWillTerminate: (NSNotification *) not;
{ {

View file

@ -1,27 +1,13 @@
{ {
BundleController = { BundleController = {
Actions = ( Actions = (
setDelegate: setDelegate
); );
Outlets = ( Outlets = (
delegate delegate
); );
Super = NSObject; Super = NSObject;
}; };
Controller = {
Actions = (
createNew:,
createNewProject:,
infoPanel:,
open:,
openProject:,
saveAll:,
showPreferencesPanel:
);
Outlets = (
);
Super = NSObject;
};
IBInspector = { IBInspector = {
Actions = ( Actions = (
ok:, ok:,
@ -90,27 +76,24 @@
}; };
Preferences = { Preferences = {
Actions = ( Actions = (
ok:, ok,
prefsChanged:, revert,
revert: revertToDefault,
prefsChanged,
setObject
); );
Outlets = ( Outlets = (
bspSoundPath, "e\n\tfloat\t\tyLight",
offsetBrushCopy, "e\n\tfloat\t\tzLight",
projectPath, "e\n\tBOOL\t\tshowBSPOutput"
showBSPOutput,
startWad,
xLight,
yLight,
zLight
); );
Super = NSObject; Super = NSObject;
}; };
PrefsWindowController = { PrefsPanel = {
Actions = ( Actions = (
); );
Outlets = ( Outlets = (
); );
Super = NSObject; Super = NSPanel;
}; };
} }

Binary file not shown.