From 5bc8581389205b2bd18271760f571c23c1700343 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Tue, 13 Apr 2010 10:52:44 +0200 Subject: [PATCH] [#12] Tweaked the custom command feature under Cocoa. --- cocoa/base/ResultWindow.m | 7 +- cocoa/se/xib/Preferences.xib | 344 +++++++++++++++++------------------ 2 files changed, 178 insertions(+), 173 deletions(-) diff --git a/cocoa/base/ResultWindow.m b/cocoa/base/ResultWindow.m index 4c60c20d..1d7dc9b9 100644 --- a/cocoa/base/ResultWindow.m +++ b/cocoa/base/ResultWindow.m @@ -204,7 +204,12 @@ http://www.hardcoded.net/licenses/hs_license { NSUserDefaults *ud = [NSUserDefaults standardUserDefaults]; NSString *cmd = [ud stringForKey:@"CustomCommand"]; - [py invokeCommand:cmd]; + if ((cmd != nil) && ([cmd length] > 0)) { + [py invokeCommand:cmd]; + } + else { + [Dialogs showMessage:@"You have no custom command set up. Set it up in your preferences."]; + } } - (IBAction)markAll:(id)sender diff --git a/cocoa/se/xib/Preferences.xib b/cocoa/se/xib/Preferences.xib index 93686d93..6b826e31 100644 --- a/cocoa/se/xib/Preferences.xib +++ b/cocoa/se/xib/Preferences.xib @@ -44,7 +44,7 @@ 3 2 - {{92, 269}, {389, 333}} + {{92, 300}, {389, 302}} 1886912512 dupeGuru Preferences @@ -90,7 +90,7 @@ 12 - {{13, 40}, {363, 287}} + {{13, 40}, {363, 256}} YES @@ -104,7 +104,7 @@ 292 - {{117, 179}, {181, 21}} + {{117, 148}, {181, 21}} YES @@ -132,7 +132,7 @@ 292 - {{119, 162}, {80, 13}} + {{119, 131}, {80, 13}} YES @@ -168,7 +168,7 @@ 289 - {{216, 162}, {80, 13}} + {{216, 131}, {80, 13}} YES @@ -184,7 +184,7 @@ 292 - {{14, 184}, {100, 14}} + {{14, 153}, {100, 14}} YES @@ -204,7 +204,7 @@ 292 - {{17, 225}, {85, 13}} + {{17, 194}, {85, 13}} YES @@ -220,7 +220,7 @@ 292 - {{116, 214}, {216, 26}} + {{116, 183}, {216, 26}} YES @@ -285,7 +285,7 @@ 256 - {{15, 138}, {214, 18}} + {{15, 107}, {214, 18}} YES @@ -308,7 +308,7 @@ 256 - {{15, 98}, {214, 18}} + {{15, 67}, {214, 18}} YES @@ -329,7 +329,7 @@ 256 - {{15, 118}, {214, 18}} + {{15, 87}, {214, 18}} YES @@ -347,96 +347,10 @@ 25 - - - 292 - {{17, 17}, {85, 13}} - - YES - - 67239424 - 272629760 - Copy and Move: - - - - - - - - - 292 - {{107, 6}, {216, 26}} - - YES - - -2076049856 - 2048 - - - 109199615 - 1 - - - - - - 400 - 75 - - - Right in destination - - 1048576 - 2147483647 - 1 - - - _popUpItemAction: - - - YES - - - OtherViews - - - YES - - - - Recreate relative path - - 1048576 - 2147483647 - - - _popUpItemAction: - - - - - Recreate absolute path - - 1048576 - 2147483647 - - - _popUpItemAction: - - - - - 3 - YES - YES - 1 - - 256 - {{15, 36}, {283, 18}} + {{15, 5}, {283, 18}} YES @@ -457,7 +371,7 @@ 256 - {{15, 76}, {242, 18}} + {{15, 45}, {242, 18}} YES @@ -478,7 +392,7 @@ 256 - {{15, 56}, {152, 18}} + {{15, 25}, {152, 18}} YES @@ -499,7 +413,7 @@ 268 - {{173, 54}, {59, 22}} + {{173, 23}, {59, 22}} YES @@ -594,7 +508,7 @@ 292 - {{240, 56}, {23, 17}} + {{240, 25}, {23, 17}} YES @@ -610,7 +524,7 @@ 256 - {{301, 184}, {31, 14}} + {{301, 153}, {31, 14}} YES @@ -674,7 +588,7 @@ - {{10, 33}, {343, 241}} + {{10, 33}, {343, 210}} Basic @@ -691,7 +605,7 @@ 256 - {{15, 222}, {228, 18}} + {{15, 191}, {228, 18}} YES @@ -712,7 +626,7 @@ 292 - {{14, 199}, {315, 17}} + {{14, 168}, {315, 17}} YES @@ -728,7 +642,7 @@ 266 - {{17, 169}, {309, 22}} + {{17, 138}, {309, 22}} YES @@ -742,8 +656,94 @@ + + + 292 + {{14, 117}, {85, 13}} + + YES + + 67239424 + 272629760 + Copy and Move: + + + + + + + + + 292 + {{101, 106}, {216, 26}} + + YES + + -2076049856 + 2048 + + + 109199615 + 1 + + + + + + 400 + 75 + + + Right in destination + + 1048576 + 2147483647 + 1 + + + _popUpItemAction: + + + YES + + + OtherViews + + + YES + + + + Recreate relative path + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + Recreate absolute path + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + 3 + YES + YES + 1 + + - {{10, 33}, {343, 241}} + {{10, 33}, {343, 210}} Advanced @@ -761,7 +761,7 @@ - {389, 333} + {389, 302} {{0, 0}, {1440, 878}} @@ -1117,8 +1117,8 @@ YES - + @@ -1172,6 +1172,8 @@ + + @@ -1189,8 +1191,6 @@ - - @@ -1350,64 +1350,6 @@ - - 61 - - - YES - - - - - - 88 - - - - - 60 - - - YES - - - - - - 89 - - - YES - - - - - - 90 - - - YES - - - - - - - - 93 - - - - - 92 - - - - - 91 - - - 59 @@ -1552,6 +1494,64 @@ + + 61 + + + YES + + + + + + 88 + + + + + 60 + + + YES + + + + + + 89 + + + YES + + + + + + 90 + + + YES + + + + + + + + 91 + + + + + 92 + + + + + 93 + + + @@ -1675,9 +1675,9 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{88, 512}, {389, 333}} + {{88, 543}, {389, 302}} com.apple.InterfaceBuilder.CocoaPlugin - {{88, 512}, {389, 333}} + {{88, 543}, {389, 302}} {213, 107}