diff --git a/desmume/src/frontend/cocoa/cocoa_util.h b/desmume/src/frontend/cocoa/cocoa_util.h index de750d225..4cdc77c65 100644 --- a/desmume/src/frontend/cocoa/cocoa_util.h +++ b/desmume/src/frontend/cocoa/cocoa_util.h @@ -87,6 +87,18 @@ #endif +@protocol DirectoryURLDragDestTextFieldProtocol + +@required +- (void) assignDirectoryPath:(NSString *)dirPath textField:(NSTextField *)textField; + +@end + +// Subclass NSTextField to override NSDraggingDestination methods for assigning directory paths using drag-and-drop +@interface DirectoryURLDragDestTextField : NSTextField +{ } +@end + @interface NSNotificationCenter (MainThread) - (void)postNotificationOnMainThread:(NSNotification *)notification; diff --git a/desmume/src/frontend/cocoa/cocoa_util.mm b/desmume/src/frontend/cocoa/cocoa_util.mm index fcbbcd9b3..d9069f265 100644 --- a/desmume/src/frontend/cocoa/cocoa_util.mm +++ b/desmume/src/frontend/cocoa/cocoa_util.mm @@ -376,6 +376,75 @@ static NSDate *distantFutureDate = [[NSDate distantFuture] retain]; @end #endif +@implementation DirectoryURLDragDestTextField + +- (id)initWithCoder:(NSCoder *)coder +{ + self = [super initWithCoder:coder]; + if (self == nil) + { + return self; + } + + [self registerForDraggedTypes:[NSArray arrayWithObjects: NSURLPboardType, nil]]; + + return self; +} + +#pragma mark NSDraggingDestination Protocol +- (BOOL)wantsPeriodicDraggingUpdates +{ + return NO; +} + +- (NSDragOperation)draggingEntered:(id )sender +{ + NSDragOperation dragOp = NSDragOperationNone; + NSPasteboard *pboard = [sender draggingPasteboard]; + + if ([[pboard types] containsObject:NSURLPboardType]) + { + NSURL *fileURL = [NSURL URLFromPasteboard:pboard]; + NSString *filePath = [fileURL path]; + + NSFileManager *fileManager = [[NSFileManager alloc] init]; + BOOL isDir; + BOOL dirExists = [fileManager fileExistsAtPath:filePath isDirectory:&isDir]; + + if (dirExists && isDir) + { + dragOp = NSDragOperationLink; + } + + [fileManager release]; + } + + return dragOp; +} + +- (BOOL)performDragOperation:(id )sender +{ + NSWindow *window = [self window]; + id delegate = (id )[window delegate]; + NSPasteboard *pboard = [sender draggingPasteboard]; + NSString *filePath = NULL; + + if ([[pboard types] containsObject:NSURLPboardType]) + { + NSURL *fileURL = [NSURL URLFromPasteboard:pboard]; + filePath = [fileURL path]; + } + + if (filePath != NULL) + { + [delegate assignDirectoryPath:filePath textField:self]; + } + + return YES; +} + +@end + @implementation NSNotificationCenter (MainThread) - (void)postNotificationOnMainThread:(NSNotification *)notification diff --git a/desmume/src/frontend/cocoa/translations/English.lproj/MainMenu.xib b/desmume/src/frontend/cocoa/translations/English.lproj/MainMenu.xib index 0346dba1d..cba67b684 100644 --- a/desmume/src/frontend/cocoa/translations/English.lproj/MainMenu.xib +++ b/desmume/src/frontend/cocoa/translations/English.lproj/MainMenu.xib @@ -12,9 +12,7 @@ YES - - YES @@ -28682,8 +28680,8 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 NSPanel - {480, 190} - {480, 190} + {480, 177} + {480, 177} 256 @@ -28694,6 +28692,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 306 {{8, 8}, {267, 121}} + _NS:2337 YES @@ -28717,6 +28716,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 266 {{10, 136}, {377, 18}} + _NS:817 YES @@ -28738,6 +28738,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 265 {{390, 130}, {85, 28}} + _NS:610 YES @@ -28761,6 +28762,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 {{11, 155}, {161, 14}} + _NS:4068 YES @@ -28791,6 +28793,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 289 {{155, 17}, {27, 27}} + YES 67108864 @@ -28813,6 +28816,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 289 {{10, 24}, {142, 14}} + _NS:4068 YES @@ -28833,6 +28837,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 289 {{19, 80}, {76, 14}} + _NS:4068 YES @@ -28853,6 +28858,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 289 {{10, 58}, {173, 22}} + _NS:791 YES @@ -28954,6 +28960,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 12 {{9, 48}, {175, 5}} + _NS:2429 {0, 0} @@ -28975,11 +28982,13 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 {{1, 1}, {193, 104}} + _NS:21 {{278, 8}, {195, 120}} + _NS:18 {0, 0} @@ -29002,11 +29011,12 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 {480, 177} + _NS:103 {{0, 0}, {1440, 878}} - {480, 206} - {480, 206} + {480, 193} + {480, 193} ScreenshotCaptureToolPanel NO @@ -29020,6 +29030,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 8 {{313, 5}, {5, 157}} + _NS:2182 {0, 0} @@ -29043,6 +29054,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 8 {{156, 5}, {5, 157}} + _NS:2182 {0, 0} @@ -29066,6 +29078,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 264 {{329, 45}, {74, 14}} + _NS:4068 YES @@ -29086,6 +29099,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 264 {{172, 104}, {103, 14}} + _NS:4068 YES @@ -29106,6 +29120,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 264 {{164, 82}, {146, 22}} + _NS:791 YES @@ -29196,6 +29211,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 264 {{15, 104}, {92, 14}} + _NS:4068 YES @@ -29216,6 +29232,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 264 {{7, 82}, {146, 22}} + _NS:791 YES @@ -29450,6 +29467,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 264 {{15, 64}, {92, 14}} + _NS:4068 YES @@ -29470,6 +29488,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 264 {{7, 42}, {146, 22}} + _NS:791 YES @@ -29549,6 +29568,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 264 {{15, 144}, {80, 14}} + _NS:4068 YES @@ -29569,6 +29589,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 264 {{7, 122}, {146, 22}} + _NS:791 YES @@ -29638,6 +29659,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 264 {{329, 86}, {80, 14}} + _NS:4068 YES @@ -29658,6 +29680,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 264 {{172, 144}, {90, 14}} + _NS:4068 YES @@ -29688,6 +29711,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 {{15, 12}, {87, 18}} + _NS:682 YES @@ -29711,11 +29735,13 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 {{1, 1}, {144, 38}} + _NS:21 {{321, 104}, {146, 54}} + _NS:18 {0, 0} @@ -29740,6 +29766,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 264 {{321, 23}, {146, 22}} + _NS:791 YES @@ -30006,6 +30033,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 264 {{321, 64}, {146, 22}} + _NS:791 YES @@ -30108,6 +30136,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 264 {{164, 122}, {146, 22}} + _NS:791 YES @@ -30208,6 +30237,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 {{8, 14}, {132, 32}} + _NS:736 YES NO @@ -30453,11 +30483,13 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 {{1, 1}, {144, 56}} + _NS:21 {{164, 6}, {146, 72}} + _NS:18 {0, 0} @@ -30480,6 +30512,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 {474, 167} + NSView @@ -30508,7 +30541,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 {1.7976931348623157e+308, 1.7976931348623157e+308} {480, 245} - + 256 YES @@ -30517,6 +30550,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 306 {{8, 9}, {267, 188}} + _NS:2337 YES @@ -30540,6 +30574,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 290 {{10, 204}, {377, 18}} + _NS:817 YES @@ -30561,6 +30596,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 265 {{390, 198}, {85, 28}} + _NS:610 YES @@ -30584,6 +30620,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 {{11, 222}, {160, 14}} + _NS:4068 YES @@ -30614,6 +30651,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 289 {{155, 10}, {27, 27}} + YES 67108864 @@ -30636,6 +30674,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 289 {{10, 17}, {142, 14}} + _NS:4068 YES @@ -30656,6 +30695,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 289 {{15, 148}, {76, 14}} + _NS:4068 YES @@ -30676,6 +30716,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 289 {{10, 126}, {173, 22}} + _NS:791 YES @@ -30722,6 +30763,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 289 {{10, 75}, {173, 22}} + _NS:791 YES @@ -30894,6 +30936,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 289 {{18, 97}, {68, 14}} + _NS:4068 YES @@ -30914,6 +30957,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 289 {{19, 54}, {20, 14}} + _NS:4068 YES @@ -30937,6 +30981,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 {{40, 52}, {54, 19}} + _NS:185 YES @@ -31012,6 +31057,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 289 {{105, 54}, {20, 14}} + _NS:4068 YES @@ -31035,6 +31081,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 {{126, 52}, {54, 19}} + _NS:185 YES @@ -31110,6 +31157,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 12 {{9, 115}, {175, 5}} + _NS:2429 {0, 0} @@ -31133,6 +31181,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 12 {{9, 41}, {175, 5}} + _NS:2429 {0, 0} @@ -31154,11 +31203,13 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 {{1, 1}, {193, 172}} + _NS:21 {{278, 9}, {195, 188}} + _NS:18 {0, 0} @@ -31180,6 +31231,8 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 {480, 245} + + _NS:103 {{0, 0}, {1440, 878}} @@ -47415,6 +47468,22 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 10999 + + + saveDirectoryPathTextField + + + + 11013 + + + + delegate + + + + 11014 + @@ -65211,6 +65280,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 10592.IBPluginDependency 10592.IBViewBoundsToFrameTransform 10593.IBPluginDependency + 10617.CustomClassName 10617.IBPluginDependency 10617.IBViewBoundsToFrameTransform 10618.IBPluginDependency @@ -65384,6 +65454,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 10913.IBViewBoundsToFrameTransform 10914.IBPluginDependency 10914.IBViewBoundsToFrameTransform + 10915.CustomClassName 10915.IBPluginDependency 10915.IBViewBoundsToFrameTransform 10916.IBPluginDependency @@ -68493,14 +68564,15 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 - {480, 190} - {480, 190} + {480, 177} + {480, 177} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin P4AAAL+AAABBkAAAw8gAAA com.apple.InterfaceBuilder.CocoaPlugin + DirectoryURLDragDestTextField com.apple.InterfaceBuilder.CocoaPlugin P4AAAL+AAABBoAAAw9SAAA @@ -68746,6 +68818,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 P4AAAL+AAABD8AAAw9aAAA + DirectoryURLDragDestTextField com.apple.InterfaceBuilder.CocoaPlugin P4AAAL+AAABBoAAAw9SAAA @@ -72276,7 +72349,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 - 11012 + 11014 @@ -72698,6 +72771,14 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 userinterface/cheatWindowDelegate.h + + DirectoryURLDragDestTextField + NSTextField + + IBProjectSource + cocoa_util.h + + DisplayPreviewView NSView @@ -74117,6 +74198,38 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 + + YES + + YES + saveDirectoryPathTextField + window + + + YES + DirectoryURLDragDestTextField + NSWindow + + + + YES + + YES + saveDirectoryPathTextField + window + + + YES + + saveDirectoryPathTextField + DirectoryURLDragDestTextField + + + window + NSWindow + + + IBProjectSource userinterface/MacScreenshotCaptureTool.h diff --git a/desmume/src/frontend/cocoa/userinterface/MacScreenshotCaptureTool.h b/desmume/src/frontend/cocoa/userinterface/MacScreenshotCaptureTool.h index 177353752..104046121 100644 --- a/desmume/src/frontend/cocoa/userinterface/MacScreenshotCaptureTool.h +++ b/desmume/src/frontend/cocoa/userinterface/MacScreenshotCaptureTool.h @@ -22,6 +22,7 @@ #include #include "../ClientDisplayView.h" +#include "../cocoa_util.h" #ifdef BOOL #undef BOOL @@ -30,12 +31,14 @@ @class MacClientSharedObject; #if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5 -@interface MacScreenshotCaptureToolDelegate : NSObject +@interface MacScreenshotCaptureToolDelegate : NSObject #else -@interface MacScreenshotCaptureToolDelegate : NSObject +@interface MacScreenshotCaptureToolDelegate : NSObject #endif { + NSObject *dummyObject; NSWindow *window; + DirectoryURLDragDestTextField *saveDirectoryPathTextField; MacClientSharedObject *sharedData; @@ -53,7 +56,9 @@ NSInteger pixelScalerID; } +@property (readonly) IBOutlet NSObject *dummyObject; @property (readonly) IBOutlet NSWindow *window; +@property (readonly) IBOutlet DirectoryURLDragDestTextField *saveDirectoryPathTextField; @property (retain) MacClientSharedObject *sharedData; diff --git a/desmume/src/frontend/cocoa/userinterface/MacScreenshotCaptureTool.mm b/desmume/src/frontend/cocoa/userinterface/MacScreenshotCaptureTool.mm index 91b85fd6c..4996f89ba 100644 --- a/desmume/src/frontend/cocoa/userinterface/MacScreenshotCaptureTool.mm +++ b/desmume/src/frontend/cocoa/userinterface/MacScreenshotCaptureTool.mm @@ -29,7 +29,9 @@ @implementation MacScreenshotCaptureToolDelegate +@synthesize dummyObject; @synthesize window; +@synthesize saveDirectoryPathTextField; @synthesize sharedData; @synthesize saveDirectoryPath; @synthesize romName; @@ -207,6 +209,15 @@ [[NSUserDefaults standardUserDefaults] setInteger:[self displayRotation] forKey:@"ScreenshotCaptureTool_DisplayRotation"]; } +#pragma mark DirectoryURLDragDestTextFieldProtocol Protocol +- (void)assignDirectoryPath:(NSString *)dirPath textField:(NSTextField *)textField +{ + if (textField == saveDirectoryPathTextField) + { + [self setSaveDirectoryPath:dirPath]; + } +} + @end static void* RunFileWriteThread(void *arg)