From f7179cdca447c534029bb36a776595bbe3fc999e Mon Sep 17 00:00:00 2001 From: David Athay Date: Sat, 22 Nov 2008 11:50:17 +0000 Subject: Added custom nib for Cmd-Q on OSX --- English.lproj/SDLMain.nib/classes.nib | 8 + English.lproj/SDLMain.nib/info.nib | 20 +++ English.lproj/SDLMain.nib/objects.xib | 77 ++++++++++ Info.plist | 2 +- SDLMain.nib/classes.nib | 8 + SDLMain.nib/info.nib | 20 +++ SDLMain.nib/objects.xib | 80 ++++++++++ src/SDLMain.m | 257 ++++++++++++++++++++++---------- themanaworld.xcodeproj/garfield.mode1v3 | 23 +-- themanaworld.xcodeproj/garfield.pbxuser | 169 +++++++++++++-------- themanaworld.xcodeproj/project.pbxproj | 15 -- 11 files changed, 513 insertions(+), 166 deletions(-) create mode 100644 English.lproj/SDLMain.nib/classes.nib create mode 100644 English.lproj/SDLMain.nib/info.nib create mode 100644 English.lproj/SDLMain.nib/objects.xib create mode 100644 SDLMain.nib/classes.nib create mode 100644 SDLMain.nib/info.nib create mode 100644 SDLMain.nib/objects.xib diff --git a/English.lproj/SDLMain.nib/classes.nib b/English.lproj/SDLMain.nib/classes.nib new file mode 100644 index 00000000..c4b887e7 --- /dev/null +++ b/English.lproj/SDLMain.nib/classes.nib @@ -0,0 +1,8 @@ + + + + + IBVersion + 1 + + diff --git a/English.lproj/SDLMain.nib/info.nib b/English.lproj/SDLMain.nib/info.nib new file mode 100644 index 00000000..0411a4a5 --- /dev/null +++ b/English.lproj/SDLMain.nib/info.nib @@ -0,0 +1,20 @@ + + + + + IBFramework Version + 670 + IBLastKnownRelativeProjectPath + ../themanaworld.xcodeproj + IBOldestOS + 5 + IBOpenObjects + + 29 + + IBSystem Version + 9F33 + targetFramework + IBCarbonFramework + + diff --git a/English.lproj/SDLMain.nib/objects.xib b/English.lproj/SDLMain.nib/objects.xib new file mode 100644 index 00000000..6d0c83db --- /dev/null +++ b/English.lproj/SDLMain.nib/objects.xib @@ -0,0 +1,77 @@ + + + + + + + Quit + q + TRUE + quit + + + FALSE + TRUE + TRUE + FALSE + Window + + 0 0 480 360 + 0 0 360 480 + + 204 300 564 780 + 0 0 768 1024 + + + themanaworld + _NSAppleMenu + + + About themanaworld + 0 + abou + + + TRUE + TRUE + TRUE + + + + + + + main + _NSMainMenu + + + themanaworld + + + + + + + + + + + + + + + + + + + + File's Owner + + MainWindow + + MenuBar + + + IBCarbonFramework + 231 + diff --git a/Info.plist b/Info.plist index 8699a8ae..36084dd8 100644 --- a/Info.plist +++ b/Info.plist @@ -21,7 +21,7 @@ NSHumanReadableCopyright Copyright 2008 The Mana World Development Team NSMainNibFile - main + SDLMain NSPrincipalClass NSApplication NSPrincipleClass diff --git a/SDLMain.nib/classes.nib b/SDLMain.nib/classes.nib new file mode 100644 index 00000000..c4b887e7 --- /dev/null +++ b/SDLMain.nib/classes.nib @@ -0,0 +1,8 @@ + + + + + IBVersion + 1 + + diff --git a/SDLMain.nib/info.nib b/SDLMain.nib/info.nib new file mode 100644 index 00000000..a753dd52 --- /dev/null +++ b/SDLMain.nib/info.nib @@ -0,0 +1,20 @@ + + + + + IBFramework Version + 670 + IBLastKnownRelativeProjectPath + themanaworld.xcodeproj + IBOldestOS + 5 + IBOpenObjects + + 29 + + IBSystem Version + 9F33 + targetFramework + IBCarbonFramework + + diff --git a/SDLMain.nib/objects.xib b/SDLMain.nib/objects.xib new file mode 100644 index 00000000..f4adb409 --- /dev/null +++ b/SDLMain.nib/objects.xib @@ -0,0 +1,80 @@ + + + + + + + themanaworld + _NSAppleMenu + + + About themanaworld + 0 + abou + + + TRUE + TRUE + TRUE + + + Quit + q + TRUE + quit + + + + + FALSE + FALSE + FALSE + FALSE + FALSE + TRUE + FALSE + Window + + 0 0 800 600 + 0 0 600 800 + + 154 408 754 1208 + 64 0 1028 1680 + + + The Mana World + + + + + + main + _NSMainMenu + + + + + + + + + + + + + + + + + + + File's Owner + + MainWindow + + MenuBar + + + IBCarbonFramework + 231 + diff --git a/src/SDLMain.m b/src/SDLMain.m index 19694b5f..3d02719c 100755 --- a/src/SDLMain.m +++ b/src/SDLMain.m @@ -1,33 +1,67 @@ /* SDLMain.m - main entry point for our Cocoa-ized SDL app - Initial Version: Darrell Walisser - Non-NIB-Code & other changes: Max Horn - - Feel free to customize this file to suit your needs -*/ + Initial Version: Darrell Walisser + Non-NIB-Code & other changes: Max Horn + + Feel free to customize this file to suit your needs + */ #import "SDL.h" #import "SDLMain.h" #import /* for MAXPATHLEN */ #import +/* For some reaon, Apple removed setAppleMenu from the headers in 10.4, + but the method still is there and works. To avoid warnings, we declare + it ourselves here. */ +@interface NSApplication(SDL_Missing_Methods) +- (void)setAppleMenu:(NSMenu *)menu; +@end + /* Use this flag to determine whether we use SDLMain.nib or not */ #define SDL_USE_NIB_FILE 0 +/* Use this flag to determine whether we use CPS (docking) or not */ +#define SDL_USE_CPS 1 +#ifdef SDL_USE_CPS +/* Portions of CPS.h */ +typedef struct CPSProcessSerNum + { + UInt32 lo; + UInt32 hi; + } CPSProcessSerNum; + +extern OSErr CPSGetCurrentProcess( CPSProcessSerNum *psn); +extern OSErr CPSEnableForegroundOperation( CPSProcessSerNum *psn, UInt32 _arg2, UInt32 _arg3, UInt32 _arg4, UInt32 _arg5); +extern OSErr CPSSetFrontProcess( CPSProcessSerNum *psn); + +#endif /* SDL_USE_CPS */ static int gArgc; static char **gArgv; static BOOL gFinderLaunch; +static BOOL gCalledAppMainline = FALSE; + +static NSString *getApplicationName(void) +{ + NSDictionary *dict; + NSString *appName = 0; + + /* Determine the application name */ + dict = (NSDictionary *)CFBundleGetInfoDictionary(CFBundleGetMainBundle()); + if (dict) + appName = [dict objectForKey: @"CFBundleName"]; + + if (![appName length]) + appName = [[NSProcessInfo processInfo] processName]; + + return appName; +} #if SDL_USE_NIB_FILE /* A helper category for NSString */ @interface NSString (ReplaceSubString) - (NSString *)stringByReplacingRange:(NSRange)aRange with:(NSString *)aString; @end -#else -/* An internal Apple class used to setup Apple menus */ -@interface NSAppleMenuController:NSObject {} -- (void)controlMenu:(NSMenu *)aMenu; -@end #endif @interface SDLApplication : NSApplication @@ -44,32 +78,24 @@ static BOOL gFinderLaunch; } @end - /* The main class of the application, the application's delegate */ @implementation SDLMain /* Set the working directory to the .app's parent directory */ - (void) setupWorkingDirectory:(BOOL)shouldChdir { - char parentdir[MAXPATHLEN]; - char *c; - - strncpy ( parentdir, gArgv[0], sizeof(parentdir) ); - c = (char*) parentdir; - - while (*c != '\0') /* go to end */ - c++; - - while (*c != '/') /* back up to parent */ - c--; - - *c++ = '\0'; /* cut off last part (binary name) */ - if (shouldChdir) { - assert ( chdir (parentdir) == 0 ); /* chdir to the binary app's parent */ - assert ( chdir ("../../../") == 0 ); /* chdir to the .app's parent */ - } + char parentdir[MAXPATHLEN]; + CFURLRef url = CFBundleCopyBundleURL(CFBundleGetMainBundle()); + CFURLRef url2 = CFURLCreateCopyDeletingLastPathComponent(0, url); + if (CFURLGetFileSystemRepresentation(url2, true, (UInt8 *)parentdir, MAXPATHLEN)) { + assert ( chdir (parentdir) == 0 ); /* chdir to the binary app's parent */ + } + CFRelease(url); + CFRelease(url2); + } + } #if SDL_USE_NIB_FILE @@ -80,11 +106,11 @@ static BOOL gFinderLaunch; NSRange aRange; NSEnumerator *enumerator; NSMenuItem *menuItem; - + aRange = [[aMenu title] rangeOfString:@"SDL App"]; if (aRange.length != 0) [aMenu setTitle: [[aMenu title] stringByReplacingRange:aRange with:appName]]; - + enumerator = [[aMenu itemArray] objectEnumerator]; while ((menuItem = [enumerator nextObject])) { @@ -99,39 +125,57 @@ static BOOL gFinderLaunch; #else -void setupAppleMenu(void) +static void setApplicationMenu(void) { /* warning: this code is very odd */ - NSAppleMenuController *appleMenuController; NSMenu *appleMenu; - NSMenuItem *appleMenuItem; - - appleMenuController = [[NSAppleMenuController alloc] init]; + NSMenuItem *menuItem; + NSString *title; + NSString *appName; + + appName = getApplicationName(); appleMenu = [[NSMenu alloc] initWithTitle:@""]; - appleMenuItem = [[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent:@""]; - - [appleMenuItem setSubmenu:appleMenu]; - - /* yes, we do need to add it and then remove it -- - if you don't add it, it doesn't get displayed - if you don't remove it, you have an extra, titleless item in the menubar - when you remove it, it appears to stick around - very, very odd */ - [[NSApp mainMenu] addItem:appleMenuItem]; - [appleMenuController controlMenu:appleMenu]; - [[NSApp mainMenu] removeItem:appleMenuItem]; + + /* Add menu items */ + title = [@"About " stringByAppendingString:appName]; + [appleMenu addItemWithTitle:title action:@selector(orderFrontStandardAboutPanel:) keyEquivalent:@""]; + + [appleMenu addItem:[NSMenuItem separatorItem]]; + + title = [@"Hide " stringByAppendingString:appName]; + [appleMenu addItemWithTitle:title action:@selector(hide:) keyEquivalent:@"h"]; + + menuItem = (NSMenuItem *)[appleMenu addItemWithTitle:@"Hide Others" action:@selector(hideOtherApplications:) keyEquivalent:@"h"]; + [menuItem setKeyEquivalentModifierMask:(NSAlternateKeyMask|NSCommandKeyMask)]; + + [appleMenu addItemWithTitle:@"Show All" action:@selector(unhideAllApplications:) keyEquivalent:@""]; + + [appleMenu addItem:[NSMenuItem separatorItem]]; + + title = [@"Quit " stringByAppendingString:appName]; + [appleMenu addItemWithTitle:title action:@selector(terminate:) keyEquivalent:@"q"]; + + + /* Put menu into the menubar */ + menuItem = [[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent:@""]; + [menuItem setSubmenu:appleMenu]; + [[NSApp mainMenu] addItem:menuItem]; + + /* Tell the application object that this is now the application menu */ + [NSApp setAppleMenu:appleMenu]; + + /* Finally give up our references to the objects */ [appleMenu release]; - [appleMenuItem release]; + [menuItem release]; } /* Create a window menu */ -void setupWindowMenu(void) +static void setupWindowMenu(void) { - NSMenu *windowMenu; - NSMenuItem *windowMenuItem; - NSMenuItem *menuItem; - - + NSMenu *windowMenu; + NSMenuItem *windowMenuItem; + NSMenuItem *menuItem; + windowMenu = [[NSMenu alloc] initWithTitle:@"Window"]; /* "Minimize" item */ @@ -146,24 +190,35 @@ void setupWindowMenu(void) /* Tell the application object that this is now the window menu */ [NSApp setWindowsMenu:windowMenu]; - + /* Finally give up our references to the objects */ [windowMenu release]; [windowMenuItem release]; } /* Replacement for NSApplicationMain */ -void CustomApplicationMain (argc, argv) +static void CustomApplicationMain (int argc, char **argv) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; SDLMain *sdlMain; - + /* Ensure the application object is initialised */ [SDLApplication sharedApplication]; +#ifdef SDL_USE_CPS + { + CPSProcessSerNum PSN; + /* Tell the dock about us */ + if (!CPSGetCurrentProcess(&PSN)) + if (!CPSEnableForegroundOperation(&PSN,0x03,0x3C,0x2C,0x1103)) + if (!CPSSetFrontProcess(&PSN)) + [SDLApplication sharedApplication]; + } +#endif /* SDL_USE_CPS */ + /* Set up the menubar */ [NSApp setMainMenu:[[NSMenu alloc] init]]; - setupAppleMenu(); + setApplicationMenu(); setupWindowMenu(); /* Create SDLMain and make it the app delegate */ @@ -179,22 +234,73 @@ void CustomApplicationMain (argc, argv) #endif + +/* + * Catch document open requests...this lets us notice files when the app + * was launched by double-clicking a document, or when a document was + * dragged/dropped on the app's icon. You need to have a + * CFBundleDocumentsType section in your Info.plist to get this message, + * apparently. + * + * Files are added to gArgv, so to the app, they'll look like command line + * arguments. Previously, apps launched from the finder had nothing but + * an argv[0]. + * + * This message may be received multiple times to open several docs on launch. + * + * This message is ignored once the app's mainline has been called. + */ +- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename +{ + const char *temparg; + size_t arglen; + char *arg; + char **newargv; + + if (!gFinderLaunch) /* MacOS is passing command line args. */ + return FALSE; + + if (gCalledAppMainline) /* app has started, ignore this document. */ + return FALSE; + + temparg = [filename UTF8String]; + arglen = SDL_strlen(temparg) + 1; + arg = (char *) SDL_malloc(arglen); + if (arg == NULL) + return FALSE; + + newargv = (char **) realloc(gArgv, sizeof (char *) * (gArgc + 2)); + if (newargv == NULL) + { + SDL_free(arg); + return FALSE; + } + gArgv = newargv; + + SDL_strlcpy(arg, temparg, arglen); + gArgv[gArgc++] = arg; + gArgv[gArgc] = NULL; + return TRUE; +} + + /* Called when the internal event loop has just started running */ - (void) applicationDidFinishLaunching: (NSNotification *) note { int status; - + /* Set the working directory to the .app's parent directory */ [self setupWorkingDirectory:gFinderLaunch]; - + #if SDL_USE_NIB_FILE /* Set the main menu to contain the real app name instead of "SDL App" */ - [self fixMenu:[NSApp mainMenu] withAppName:[[NSProcessInfo processInfo] processName]]; + [self fixMenu:[NSApp mainMenu] withAppName:getApplicationName()]; #endif - + /* Hand off to main application code */ + gCalledAppMainline = TRUE; status = SDL_main (gArgc, gArgv); - + /* We're done, thank you for playing */ exit(status); } @@ -211,7 +317,7 @@ void CustomApplicationMain (argc, argv) unichar *buffer; NSRange localRange; NSString *result; - + bufferSize = selfLen + aStringLen - aRange.length; buffer = NSAllocateMemoryPages(bufferSize*sizeof(unichar)); @@ -224,7 +330,7 @@ void CustomApplicationMain (argc, argv) localRange.location = 0; localRange.length = aStringLen; [aString getCharacters:(buffer+aRange.location) range:localRange]; - + /* Get last part into buffer */ localRange.location = aRange.location + aRange.length; localRange.length = selfLen - localRange.location; @@ -250,24 +356,23 @@ void CustomApplicationMain (argc, argv) /* Main entry point to executable - should *not* be SDL_main! */ int main (int argc, char **argv) { - /* Copy the arguments into a global variable */ - int i; - /* This is passed if we are launched by double-clicking */ if ( argc >= 2 && strncmp (argv[1], "-psn", 4) == 0 ) { + gArgv = (char **) SDL_malloc(sizeof (char *) * 2); + gArgv[0] = argv[0]; + gArgv[1] = NULL; gArgc = 1; - gFinderLaunch = YES; + gFinderLaunch = YES; } else { + int i; gArgc = argc; - gFinderLaunch = NO; + gArgv = (char **) SDL_malloc(sizeof (char *) * (argc+1)); + for (i = 0; i <= argc; i++) + gArgv[i] = argv[i]; + gFinderLaunch = NO; } - gArgv = (char**) malloc (sizeof(*gArgv) * (gArgc+1)); - assert (gArgv != NULL); - for (i = 0; i < gArgc; i++) - gArgv[i] = argv[i]; - gArgv[i] = NULL; - + #if SDL_USE_NIB_FILE [SDLApplication poseAsClass:[NSApplication class]]; NSApplicationMain (argc, argv); diff --git a/themanaworld.xcodeproj/garfield.mode1v3 b/themanaworld.xcodeproj/garfield.mode1v3 index 1b941b63..0076a8bc 100644 --- a/themanaworld.xcodeproj/garfield.mode1v3 +++ b/themanaworld.xcodeproj/garfield.mode1v3 @@ -267,15 +267,12 @@ 20286C29FDCF999611CA2CEA 5048396909E3304600765E4B 20286C2CFDCF999611CA2CEA - 1C37FBAC04509CD000000102 - 927F62010ED4EA4500D919E6 PBXSmartGroupTreeModuleOutlineStateSelectionKey - 16 - 15 - 14 + 1 + 0 PBXSmartGroupTreeModuleOutlineStateVisibleRectKey @@ -326,19 +323,27 @@ _historyCapacity 0 bookmark - 927F623A0ED4EBEB00D919E6 + 927F62650ED4F41700D919E6 history - 92B1EBDD0ED4E43D009AF197 92B1EBDE0ED4E43D009AF197 92B1EBF30ED4E5C5009AF197 - 92B1EC470ED4EA36009AF197 + 927F625B0ED4F41700D919E6 + 927F625C0ED4F41700D919E6 + 927F625D0ED4F41700D919E6 prevStack 92B1EBE00ED4E43D009AF197 92B1EBE10ED4E43D009AF197 92B1EBF50ED4E5C5009AF197 + 927F625E0ED4F41700D919E6 + 927F625F0ED4F41700D919E6 + 927F62600ED4F41700D919E6 + 927F62610ED4F41700D919E6 + 927F62620ED4F41700D919E6 + 927F62630ED4F41700D919E6 + 927F62640ED4F41700D919E6 SplitCount @@ -531,8 +536,8 @@ WindowOrderList 92A4CC8A0D1C5F1E00CA28FB - 1C78EAAD065D492600B07095 1CD10A99069EF8BA00B06720 + 1C78EAAD065D492600B07095 /Users/garfield/programming/tmwclient/themanaworld.xcodeproj WindowString diff --git a/themanaworld.xcodeproj/garfield.pbxuser b/themanaworld.xcodeproj/garfield.pbxuser index ada25426..42957a89 100644 --- a/themanaworld.xcodeproj/garfield.pbxuser +++ b/themanaworld.xcodeproj/garfield.pbxuser @@ -134,23 +134,26 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 248834629; - PBXWorkspaceStateSaveDate = 248834629; + PBXPerProjectTemplateStateSaveDate = 249045476; + PBXWorkspaceStateSaveDate = 249045476; }; perUserProjectItems = { - 927F62190ED4EA6A00D919E6 /* PlistBookmark */ = 927F62190ED4EA6A00D919E6 /* PlistBookmark */; - 927F621C0ED4EA6A00D919E6 /* PlistBookmark */ = 927F621C0ED4EA6A00D919E6 /* PlistBookmark */; - 927F623A0ED4EBEB00D919E6 /* PlistBookmark */ = 927F623A0ED4EBEB00D919E6 /* PlistBookmark */; - 92B1EBDD0ED4E43D009AF197 = 92B1EBDD0ED4E43D009AF197 /* PBXTextBookmark */; + 927F625B0ED4F41700D919E6 = 927F625B0ED4F41700D919E6 /* PBXTextBookmark */; + 927F625C0ED4F41700D919E6 = 927F625C0ED4F41700D919E6 /* PBXTextBookmark */; + 927F625D0ED4F41700D919E6 = 927F625D0ED4F41700D919E6 /* PlistBookmark */; + 927F625E0ED4F41700D919E6 = 927F625E0ED4F41700D919E6 /* PlistBookmark */; + 927F625F0ED4F41700D919E6 = 927F625F0ED4F41700D919E6 /* PBXTextBookmark */; + 927F62600ED4F41700D919E6 = 927F62600ED4F41700D919E6 /* PBXTextBookmark */; + 927F62610ED4F41700D919E6 = 927F62610ED4F41700D919E6 /* PlistBookmark */; + 927F62620ED4F41700D919E6 = 927F62620ED4F41700D919E6 /* PBXTextBookmark */; + 927F62630ED4F41700D919E6 = 927F62630ED4F41700D919E6 /* PlistBookmark */; + 927F62640ED4F41700D919E6 = 927F62640ED4F41700D919E6 /* PBXTextBookmark */; + 927F62650ED4F41700D919E6 = 927F62650ED4F41700D919E6 /* PlistBookmark */; 92B1EBDE0ED4E43D009AF197 = 92B1EBDE0ED4E43D009AF197 /* PBXTextBookmark */; 92B1EBE00ED4E43D009AF197 = 92B1EBE00ED4E43D009AF197 /* PBXTextBookmark */; 92B1EBE10ED4E43D009AF197 = 92B1EBE10ED4E43D009AF197 /* PBXTextBookmark */; - 92B1EBE90ED4E547009AF197 = 92B1EBE90ED4E547009AF197 /* PBXBookmark */; 92B1EBF30ED4E5C5009AF197 = 92B1EBF30ED4E5C5009AF197 /* PBXTextBookmark */; 92B1EBF50ED4E5C5009AF197 = 92B1EBF50ED4E5C5009AF197 /* PBXTextBookmark */; - 92B1EC440ED4EA36009AF197 = 92B1EC440ED4EA36009AF197 /* PlistBookmark */; - 92B1EC470ED4EA36009AF197 = 92B1EC470ED4EA36009AF197 /* PlistBookmark */; - 92B1EC480ED4EA36009AF197 = 92B1EC480ED4EA36009AF197 /* PlistBookmark */; }; sourceControlManager = 92BC3EC80BAEE3C8000DAB7F /* Source Control */; userBuildSettings = { @@ -172,9 +175,10 @@ }; 92037A190ED2035A00D3712D /* SDLMain.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {511, 348}}"; + sepNavIntBoundsRect = "{{0, 0}, {802, 506}}"; sepNavSelRange = "{0, 0}"; sepNavVisRange = "{0, 307}"; + sepNavWindowFrame = "{{15, 389}, {861, 634}}"; }; }; 924A42600C0874D00066885E /* Info.plist */ = { @@ -193,7 +197,38 @@ sepNavVisRange = "{1251, 209}"; }; }; - 927F62190ED4EA6A00D919E6 /* PlistBookmark */ = { + 927F625B0ED4F41700D919E6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 92037A190ED2035A00D3712D /* SDLMain.h */; + name = "SDLMain.h: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 307; + vrLoc = 0; + }; + 927F625C0ED4F41700D919E6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 92BC40E50BAEF54B000DAB7F /* SDLMain.m */; + name = "SDLMain.m: 14"; + rLen = 0; + rLoc = 440; + rType = 0; + vrLen = 759; + vrLoc = 0; + }; + 927F625D0ED4F41700D919E6 /* PlistBookmark */ = { + isa = PlistBookmark; + fRef = 924A42600C0874D00066885E /* Info.plist */; + fallbackIsa = PBXBookmark; + isK = 0; + kPath = ( + ); + name = /Users/garfield/programming/tmwclient/Info.plist; + rLen = 0; + rLoc = 2147483647; + }; + 927F625E0ED4F41700D919E6 /* PlistBookmark */ = { isa = PlistBookmark; fRef = 924A42600C0874D00066885E /* Info.plist */; fallbackIsa = PBXBookmark; @@ -205,24 +240,76 @@ rLen = 0; rLoc = 2147483647; }; - 927F621C0ED4EA6A00D919E6 /* PlistBookmark */ = { + 927F625F0ED4F41700D919E6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 92037A190ED2035A00D3712D /* SDLMain.h */; + name = "SDLMain.h: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 307; + vrLoc = 0; + }; + 927F62600ED4F41700D919E6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 92BC40E50BAEF54B000DAB7F /* SDLMain.m */; + name = "SDLMain.m: 14"; + rLen = 0; + rLoc = 440; + rType = 0; + vrLen = 635; + vrLoc = 124; + }; + 927F62610ED4F41700D919E6 /* PlistBookmark */ = { isa = PlistBookmark; fRef = 924A42600C0874D00066885E /* Info.plist */; fallbackIsa = PBXBookmark; isK = 0; kPath = ( + NSPrincipalClass, ); name = /Users/garfield/programming/tmwclient/Info.plist; rLen = 0; rLoc = 2147483647; }; - 927F623A0ED4EBEB00D919E6 /* PlistBookmark */ = { + 927F62620ED4F41700D919E6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 92BC40E50BAEF54B000DAB7F /* SDLMain.m */; + name = "SDLMain.m: 14"; + rLen = 0; + rLoc = 440; + rType = 0; + vrLen = 643; + vrLoc = 7053; + }; + 927F62630ED4F41700D919E6 /* PlistBookmark */ = { isa = PlistBookmark; fRef = 924A42600C0874D00066885E /* Info.plist */; fallbackIsa = PBXBookmark; isK = 0; kPath = ( - NSPrincipleClass, + ); + name = /Users/garfield/programming/tmwclient/Info.plist; + rLen = 0; + rLoc = 2147483647; + }; + 927F62640ED4F41700D919E6 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 92BC40E50BAEF54B000DAB7F /* SDLMain.m */; + name = "SDLMain.m: 14"; + rLen = 0; + rLoc = 440; + rType = 0; + vrLen = 759; + vrLoc = 0; + }; + 927F62650ED4F41700D919E6 /* PlistBookmark */ = { + isa = PlistBookmark; + fRef = 924A42600C0874D00066885E /* Info.plist */; + fallbackIsa = PBXBookmark; + isK = 0; + kPath = ( + CFBundleVersion, ); name = /Users/garfield/programming/tmwclient/Info.plist; rLen = 0; @@ -252,16 +339,6 @@ sepNavWindowFrame = "{{180, 8}, {627, 714}}"; }; }; - 92B1EBDD0ED4E43D009AF197 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 92BC40E50BAEF54B000DAB7F /* SDLMain.m */; - name = "SDLMain.m: 14"; - rLen = 0; - rLoc = 440; - rType = 0; - vrLen = 759; - vrLoc = 0; - }; 92B1EBDE0ED4E43D009AF197 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 92BC3F660BAEE55B000DAB7F /* viewport.cpp */; @@ -292,10 +369,6 @@ vrLen = 780; vrLoc = 7501; }; - 92B1EBE90ED4E547009AF197 /* PBXBookmark */ = { - isa = PBXBookmark; - fRef = 924A42600C0874D00066885E /* Info.plist */; - }; 92B1EBF30ED4E5C5009AF197 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 92BC3EEF0BAEE55A000DAB7F /* graphics.h */; @@ -316,40 +389,6 @@ vrLen = 692; vrLoc = 434; }; - 92B1EC440ED4EA36009AF197 /* PlistBookmark */ = { - isa = PlistBookmark; - fRef = 924A42600C0874D00066885E /* Info.plist */; - fallbackIsa = PBXBookmark; - isK = 0; - kPath = ( - ); - name = /Users/garfield/programming/tmwclient/Info.plist; - rLen = 0; - rLoc = 2147483647; - }; - 92B1EC470ED4EA36009AF197 /* PlistBookmark */ = { - isa = PlistBookmark; - fRef = 924A42600C0874D00066885E /* Info.plist */; - fallbackIsa = PBXBookmark; - isK = 0; - kPath = ( - NSPrincipalClass, - ); - name = /Users/garfield/programming/tmwclient/Info.plist; - rLen = 0; - rLoc = 2147483647; - }; - 92B1EC480ED4EA36009AF197 /* PlistBookmark */ = { - isa = PlistBookmark; - fRef = 924A42600C0874D00066885E /* Info.plist */; - fallbackIsa = PBXBookmark; - isK = 0; - kPath = ( - ); - name = /Users/garfield/programming/tmwclient/Info.plist; - rLen = 0; - rLoc = 2147483647; - }; 92BC3EBC0BAEE3BB000DAB7F /* themanaworld */ = { isa = PBXExecutable; activeArgIndices = ( @@ -862,8 +901,8 @@ 92BC40E50BAEF54B000DAB7F /* SDLMain.m */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {726, 3906}}"; - sepNavSelRange = "{440, 0}"; - sepNavVisRange = "{7053, 643}"; + sepNavSelRange = "{3069, 0}"; + sepNavVisRange = "{2696, 949}"; sepNavWindowFrame = "{{583, 96}, {627, 714}}"; }; }; diff --git a/themanaworld.xcodeproj/project.pbxproj b/themanaworld.xcodeproj/project.pbxproj index 7bd2a8e0..5bd59f57 100644 --- a/themanaworld.xcodeproj/project.pbxproj +++ b/themanaworld.xcodeproj/project.pbxproj @@ -88,7 +88,6 @@ 926F9CF80DB005FA00AACD26 /* itemshortcut.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 926F9CF60DB005FA00AACD26 /* itemshortcut.cpp */; }; 926F9D450DB00AFC00AACD26 /* itemshortcutcontainer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 926F9D410DB00AFC00AACD26 /* itemshortcutcontainer.cpp */; }; 926F9D460DB00AFC00AACD26 /* itemshortcutwindow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 926F9D430DB00AFC00AACD26 /* itemshortcutwindow.cpp */; }; - 927F62590ED4F1D100D919E6 /* main.nib in Resources */ = {isa = PBXBuildFile; fileRef = 927F62570ED4F1D100D919E6 /* main.nib */; }; 9294DA9B0C17E70400FCEDE9 /* physfs.c in Sources */ = {isa = PBXBuildFile; fileRef = 92BC3FAB0BAEE55B000DAB7F /* physfs.c */; }; 9294DA9C0C17E70600FCEDE9 /* physfs_byteorder.c in Sources */ = {isa = PBXBuildFile; fileRef = 92BC3FAD0BAEE55B000DAB7F /* physfs_byteorder.c */; }; 9294DAA10C17E73200FCEDE9 /* libpng.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9294DAA00C17E73200FCEDE9 /* libpng.framework */; }; @@ -474,7 +473,6 @@ 926F9D420DB00AFC00AACD26 /* itemshortcutcontainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = itemshortcutcontainer.h; sourceTree = ""; }; 926F9D430DB00AFC00AACD26 /* itemshortcutwindow.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = itemshortcutwindow.cpp; sourceTree = ""; }; 926F9D440DB00AFC00AACD26 /* itemshortcutwindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = itemshortcutwindow.h; sourceTree = ""; }; - 927F62580ED4F1D100D919E6 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/main.nib; sourceTree = ""; }; 9294DAA00C17E73200FCEDE9 /* libpng.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = libpng.framework; path = /Library/Frameworks/libpng.framework; sourceTree = ""; }; 92A4CC9D0D1C622E00CA28FB /* dye.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = dye.cpp; path = src/resources/dye.cpp; sourceTree = ""; }; 92A4CCE00D1DA58D00CA28FB /* dir.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = dir.c; sourceTree = ""; }; @@ -905,7 +903,6 @@ 20286C2CFDCF999611CA2CEA /* Resources */ = { isa = PBXGroup; children = ( - 927F62570ED4F1D100D919E6 /* main.nib */, 92A4CCFE0D1DA8E500CA28FB /* LICENSE.rtf */, 924A42590C0871EC0066885E /* The Mana World.icns */, 924A3E590C085ED70066885E /* data */, @@ -1405,7 +1402,6 @@ files = ( 924A425A0C0871EC0066885E /* The Mana World.icns in Resources */, 92A4CCFF0D1DA8E500CA28FB /* LICENSE.rtf in Resources */, - 927F62590ED4F1D100D919E6 /* main.nib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1577,17 +1573,6 @@ }; /* End PBXSourcesBuildPhase section */ -/* Begin PBXVariantGroup section */ - 927F62570ED4F1D100D919E6 /* main.nib */ = { - isa = PBXVariantGroup; - children = ( - 927F62580ED4F1D100D919E6 /* English */, - ); - name = main.nib; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - /* Begin XCBuildConfiguration section */ C0E91AC608A95435008D54AB /* Debug */ = { isa = XCBuildConfiguration; -- cgit v1.2.3-70-g09d2