From 4273fdfc90a1e1eedb1a425925a589b8e231ed64 Mon Sep 17 00:00:00 2001 From: "SND\\MaddTheSane_cp" Date: Sat, 3 Dec 2011 01:32:30 +0000 Subject: Link Enable NetPlay button to the proper action. Open dialogs now have a set file types that they can open (Set by UTIs, with a new imported UTI for disc images). Retaining openDlg, then releasing when done, as per the suggestion of Apple's documentation. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@72823 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- macosx/ConfigurationController.m | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'macosx/ConfigurationController.m') diff --git a/macosx/ConfigurationController.m b/macosx/ConfigurationController.m index 288f56e3..0faccc89 100644 --- a/macosx/ConfigurationController.m +++ b/macosx/ConfigurationController.m @@ -40,6 +40,7 @@ char *mcd; NSTextField *label; NSOpenPanel *openDlg = [NSOpenPanel openPanel]; + [openDlg retain]; NSString *path; if (tag == 1) { mcd = Config.Mcd1; label = mcd1Label; } @@ -47,6 +48,7 @@ [openDlg setCanChooseFiles:YES]; [openDlg setCanChooseDirectories:NO]; + [openDlg setAllowedFileTypes:[NSArray arrayWithObject:@"com.codeplex.pcsxr.memcard"]]; path = [[NSFileManager defaultManager] stringWithFileSystemRepresentation:mcd length:strlen(mcd)]; @@ -65,6 +67,7 @@ else [[NSUserDefaults standardUserDefaults] setObject:mcdPath forKey:@"Mcd2"]; } + [openDlg release]; } - (IBAction)mcdNewClicked:(id)sender @@ -73,6 +76,7 @@ char *mcd; NSTextField *label; NSSavePanel *openDlg = [NSSavePanel savePanel]; + [openDlg retain]; NSString *path; if (tag == 1) { mcd = Config.Mcd1; label = mcd1Label; } @@ -82,6 +86,7 @@ [openDlg setDirectoryURL:[NSURL fileURLWithPath:[path stringByDeletingLastPathComponent]]]; [openDlg setNameFieldStringValue:@"New Memory Card File.mcr"]; + [openDlg setAllowedFileTypes:[NSArray arrayWithObject:@"com.codeplex.pcsxr.memcard"]]; if ([openDlg runModal] == NSFileHandlingPanelOKButton) { NSString *mcdPath = [[openDlg URL] path]; @@ -96,6 +101,7 @@ CreateMcd(mcd); } + [openDlg release]; } - (IBAction)setVideoType:(id)sender -- cgit v1.2.3