mirror of
https://github.com/arsenetar/dupeguru.git
synced 2026-01-22 22:51:39 +00:00
Instead of "manually" added a "Clear Picture Cache" menu item in the objc code, added an "edition" argument to main_menu UI script and conditionally add it there.
--HG-- branch : xibless
This commit is contained in:
@@ -10,4 +10,5 @@ http://www.hardcoded.net/licenses/bsd_license
|
||||
#import "AppDelegateBase.h"
|
||||
|
||||
@interface AppDelegate : AppDelegateBase {}
|
||||
- (void)clearPictureCache;
|
||||
@end
|
||||
|
||||
@@ -67,14 +67,8 @@ http://www.hardcoded.net/licenses/bsd_license
|
||||
return [[DetailsPanelPE alloc] initWithApp:model];
|
||||
}
|
||||
|
||||
//Delegate
|
||||
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
|
||||
- (void)clearPictureCache
|
||||
{
|
||||
// index 2 is just after "Clear Ingore List"
|
||||
NSMenuItem *mi = [actionsMenu insertItemWithTitle:TR(@"Clear Picture Cache")
|
||||
action:@selector(clearPictureCache:) keyEquivalent:@"P" atIndex:2];
|
||||
[mi setTarget:[self resultWindow]];
|
||||
[mi setKeyEquivalentModifierMask:NSCommandKeyMask|NSShiftKeyMask];
|
||||
[super applicationDidFinishLaunching:aNotification];
|
||||
[(ResultWindow *)[self resultWindow] clearPictureCache];
|
||||
}
|
||||
@end
|
||||
|
||||
@@ -10,5 +10,5 @@ http://www.hardcoded.net/licenses/bsd_license
|
||||
#import "../base/ResultWindow.h"
|
||||
|
||||
@interface ResultWindow : ResultWindowBase {}
|
||||
- (IBAction)clearPictureCache:(id)sender;
|
||||
- (void)clearPictureCache;
|
||||
@end
|
||||
|
||||
@@ -48,7 +48,7 @@ http://www.hardcoded.net/licenses/bsd_license
|
||||
}
|
||||
|
||||
/* Actions */
|
||||
- (IBAction)clearPictureCache:(id)sender
|
||||
- (void)clearPictureCache
|
||||
{
|
||||
NSString *msg = TR(@"Do you really want to remove all your cached picture analysis?");
|
||||
if ([Dialogs askYesNo:msg] == NSAlertSecondButtonReturn) // NO
|
||||
|
||||
Reference in New Issue
Block a user