mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-09 21:24:36 +00:00
Add the ME-specific "Remove Dead Tracks" menu item in the UI script instead of in the objc code.
--HG-- branch : xibless
This commit is contained in:
parent
ad5c4a954c
commit
b0f9a94375
@ -19,7 +19,6 @@ http://www.hardcoded.net/licenses/bsd_license
|
||||
@interface AppDelegateBase : NSObject
|
||||
{
|
||||
NSMenu *recentResultsMenu;
|
||||
NSMenu *actionsMenu;
|
||||
NSMenu *columnsMenu;
|
||||
SUUpdater *updater;
|
||||
|
||||
@ -34,7 +33,6 @@ http://www.hardcoded.net/licenses/bsd_license
|
||||
}
|
||||
|
||||
@property (readwrite, retain) NSMenu *recentResultsMenu;
|
||||
@property (readwrite, retain) NSMenu *actionsMenu;
|
||||
@property (readwrite, retain) NSMenu *columnsMenu;
|
||||
@property (readwrite, retain) SUUpdater *updater;
|
||||
|
||||
|
@ -18,7 +18,6 @@ http://www.hardcoded.net/licenses/bsd_license
|
||||
@implementation AppDelegateBase
|
||||
|
||||
@synthesize recentResultsMenu;
|
||||
@synthesize actionsMenu;
|
||||
@synthesize columnsMenu;
|
||||
@synthesize updater;
|
||||
|
||||
|
@ -7,7 +7,6 @@ appMenu = result.addMenu("dupeGuru")
|
||||
fileMenu = result.addMenu("File")
|
||||
editMenu = result.addMenu("Edit")
|
||||
actionMenu = result.addMenu("Actions")
|
||||
owner.actionsMenu = actionMenu
|
||||
owner.columnsMenu = result.addMenu("Columns")
|
||||
modeMenu = result.addMenu("Mode")
|
||||
windowMenu = result.addMenu("Window")
|
||||
@ -32,6 +31,8 @@ fileMenu.addItem("Save Results...", Action(None, 'saveResults'), 'cmd+s')
|
||||
fileMenu.addItem("Export Results to XHTML", Action(None, 'exportToXHTML'), 'cmd+shift+e')
|
||||
if edition == 'pe':
|
||||
fileMenu.addItem("Clear Picture Cache", Action(owner, 'clearPictureCache'), 'cmd+shift+p')
|
||||
elif edition == 'me':
|
||||
fileMenu.addItem("Remove Dead Tracks in iTunes", Action(owner, 'removeDeadTracks'))
|
||||
|
||||
editMenu.addItem("Mark All", Action(None, 'markAll'), 'cmd+a')
|
||||
editMenu.addItem("Mark None", Action(None, 'markNone'), 'cmd+shift+a')
|
||||
|
@ -12,4 +12,5 @@ http://www.hardcoded.net/licenses/bsd_license
|
||||
#import "PyDupeGuru.h"
|
||||
|
||||
@interface AppDelegate : AppDelegateBase {}
|
||||
- (void)removeDeadTracks;
|
||||
@end
|
||||
|
@ -74,13 +74,8 @@ http://www.hardcoded.net/licenses/bsd_license
|
||||
return [[DirectoryPanelME alloc] initWithParentApp:self];
|
||||
}
|
||||
|
||||
//Delegate
|
||||
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
|
||||
- (void)removeDeadTracks
|
||||
{
|
||||
// index 3 is just after "Export Results to XHTML"
|
||||
NSMenuItem *mi = [actionsMenu insertItemWithTitle:TR(@"Remove Dead Tracks in iTunes")
|
||||
action:@selector(removeDeadTracks:) keyEquivalent:@"" atIndex:3];
|
||||
[mi setTarget:[self resultWindow]];
|
||||
[super applicationDidFinishLaunching:aNotification];
|
||||
[(ResultWindow *)[self resultWindow] removeDeadTracks];
|
||||
}
|
||||
@end
|
||||
|
@ -10,5 +10,5 @@ http://www.hardcoded.net/licenses/bsd_license
|
||||
#import "../base/ResultWindow.h"
|
||||
|
||||
@interface ResultWindow : ResultWindowBase {}
|
||||
- (IBAction)removeDeadTracks:(id)sender;
|
||||
- (void)removeDeadTracks;
|
||||
@end
|
||||
|
@ -70,7 +70,7 @@ http://www.hardcoded.net/licenses/bsd_license
|
||||
}
|
||||
|
||||
/* Actions */
|
||||
- (IBAction)removeDeadTracks:(id)sender
|
||||
- (void)removeDeadTracks
|
||||
{
|
||||
[model scanDeadTracks];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user