From ef5d0defe91d406679d1c19fd22cdd5233a2ce33 Mon Sep 17 00:00:00 2001 From: "SND\\MaddTheSane_cp" Date: Thu, 24 Nov 2011 19:38:11 +0000 Subject: More changes to the Memory Card manager for Mac OS X. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@72612 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- macosx/English.lproj/Localizable.strings | 7 ++++ macosx/English.lproj/MemCardManager.xib | 58 ++++++++++++++++++++++---------- macosx/PcsxrMemCardController.m | 34 +++++++++++-------- 3 files changed, 67 insertions(+), 32 deletions(-) diff --git a/macosx/English.lproj/Localizable.strings b/macosx/English.lproj/Localizable.strings index fc649908..af3504cf 100644 --- a/macosx/English.lproj/Localizable.strings +++ b/macosx/English.lproj/Localizable.strings @@ -52,3 +52,10 @@ "CD-ROM ID: %.9s\n" = "CD-ROM ID: %.9s\n"; "Error opening file: %s.\n" = "Error opening file: %s.\n"; "Unknown CPE opcode %02x at poiition %08x.\n" = "Unknown CPE opcode %02x at position %08x.\n"; +"Format Card" = "Format Card"; +"Cancel" = "Cancel"; +"Format" = "Format"; +"Formatting a memory card will remove all data on it.\n\nThis cannot be undone." = "Formatting a memory card will remove all data on it.\n\nThis cannot be undone."; +"Delete Block" = "Delete Block"; +"Deleting a block will remove all saved data on that block.\n\nThis cannot be undone." = "Deleting a block will remove all saved data on that block.\n\nThis cannot be undone."; +"Delete" = "Delete"; diff --git a/macosx/English.lproj/MemCardManager.xib b/macosx/English.lproj/MemCardManager.xib index 7693b376..a35008e8 100644 --- a/macosx/English.lproj/MemCardManager.xib +++ b/macosx/English.lproj/MemCardManager.xib @@ -284,7 +284,7 @@ 268 - {{261, 25}, {85, 32}} + {{262, 25}, {98, 32}} @@ -294,7 +294,7 @@ 67239424 134217728 - Format + Format… _NS:687 @@ -309,7 +309,7 @@ 268 - {{13, 25}, {85, 32}} + {{14, 25}, {98, 32}} @@ -319,7 +319,7 @@ 67239424 134217728 - Format + Format… _NS:687 @@ -334,7 +334,7 @@ 268 - {{127, 25}, {80, 32}} + {{114, 25}, {93, 32}} @@ -344,7 +344,7 @@ 67239424 134217728 - Delete + Delete… _NS:687 @@ -359,16 +359,17 @@ 268 - {{374, 25}, {80, 32}} + {{362, 25}, {93, 32}} + _NS:687 2 YES 67239424 134217728 - Delete + Delete… _NS:687 @@ -422,7 +423,7 @@ NeXT TIFF v4.0 pasteboard type - {{55, 63}, {32, 32}} + {{74, 63}, {32, 32}} @@ -442,7 +443,7 @@ 266 - {{15, 38}, {115, 17}} + {{0, 38}, {181, 17}} @@ -470,9 +471,10 @@ 266 - {{15, 16}, {115, 17}} + {{0, 16}, {181, 17}} + _NS:3944 YES @@ -487,14 +489,14 @@ - {143, 108} + {180, 108} _NS:11 - {{1, 0}, {143, 108}} + {{1, 0}, {180, 108}} @@ -526,7 +528,7 @@ 0 4 - 2 + 0 NO 6 @@ -536,7 +538,7 @@ - {144, 108} + {181, 108} @@ -801,6 +803,26 @@ 45 + + + transparent: selected + + + + + + transparent: selected + transparent + selected + + NSValueTransformerName + NSNegateBoolean + + 2 + + + 75 + @@ -849,10 +871,10 @@ - - + + @@ -1170,7 +1192,7 @@ - 73 + 75 diff --git a/macosx/PcsxrMemCardController.m b/macosx/PcsxrMemCardController.m index 454da1d3..103d8b95 100644 --- a/macosx/PcsxrMemCardController.m +++ b/macosx/PcsxrMemCardController.m @@ -15,8 +15,6 @@ static inline NSImage *imageFromMcd(short * icon) { NSBitmapImageRep *imageRep = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL pixelsWide:16 pixelsHigh:16 bitsPerSample:8 samplesPerPixel:3 hasAlpha:NO isPlanar:NO colorSpaceName:NSCalibratedRGBColorSpace bytesPerRow:0 bitsPerPixel:0]; - //[imageRep setSize:NSMakeSize(32, 32)]; - //[imageRep setBitsPerSample:32]; #if 0 int x, y, c; @@ -45,6 +43,8 @@ static inline NSImage *imageFromMcd(short * icon) #endif NSImage *theImage = [[NSImage alloc] init]; [theImage addRepresentation:imageRep]; + [theImage setScalesWhenResized:YES]; + [theImage setSize:NSMakeSize(32, 32)]; [imageRep release]; return [theImage autorelease]; } @@ -162,24 +162,30 @@ static inline NSImage *imageFromMcd(short * icon) - (IBAction)formatCard:(id)sender { - NSInteger memCardSelect = [sender tag]; - if (memCardSelect == 1) { - CreateMcd(Config.Mcd1); - [self loadMemoryCardInfoForCard:1]; - } else { - CreateMcd(Config.Mcd2); - [self loadMemoryCardInfoForCard:2]; + NSInteger formatOkay = NSRunAlertPanel(NSLocalizedString(@"Format Card", nil), NSLocalizedString(@"Formatting a memory card will remove all data on it.\n\nThis cannot be undone.", nil), NSLocalizedString(@"Cancel", nil), NSLocalizedString(@"Format", nil), nil); + if (formatOkay == NSAlertAlternateReturn) { + NSInteger memCardSelect = [sender tag]; + if (memCardSelect == 1) { + CreateMcd(Config.Mcd1); + [self loadMemoryCardInfoForCard:1]; + } else { + CreateMcd(Config.Mcd2); + [self loadMemoryCardInfoForCard:2]; + } } } - (IBAction)deleteMemoryObject:(id)sender { - NSInteger memCardSelect = [sender tag]; - if (memCardSelect == 1) { + NSInteger deleteOkay = NSRunAlertPanel(NSLocalizedString(@"Delete Block", nil), NSLocalizedString(@"Deleting a block will remove all saved data on that block.\n\nThis cannot be undone.", nil), NSLocalizedString(@"Cancel", nil), NSLocalizedString(@"Delete", nil), nil); + if (deleteOkay == NSAlertAlternateReturn) { + NSInteger memCardSelect = [sender tag]; + if (memCardSelect == 1) { - [self loadMemoryCardInfoForCard:1]; - } else { + [self loadMemoryCardInfoForCard:1]; + } else { - [self loadMemoryCardInfoForCard:2]; + [self loadMemoryCardInfoForCard:2]; + } } } @end -- cgit v1.2.3