mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-10 13:44:37 +00:00
Use hsutil.cocoa.signature in me/dg_cocoa.py, Added the Remove Dead Tracks menu item which was lost since 5.7 (how did I not notice that?)
This commit is contained in:
parent
2d5502cc2f
commit
55d30d5e4b
@ -82,6 +82,16 @@ http://www.hardcoded.net/licenses/hs_license
|
|||||||
- (PyDupeGuru *)py { return (PyDupeGuru *)py; }
|
- (PyDupeGuru *)py { return (PyDupeGuru *)py; }
|
||||||
|
|
||||||
//Delegate
|
//Delegate
|
||||||
|
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
|
||||||
|
{
|
||||||
|
NSMenu *actionsMenu = [[[NSApp mainMenu] itemWithTitle:@"Actions"] submenu];
|
||||||
|
// index 3 is just after "Export Results to XHTML"
|
||||||
|
NSMenuItem *mi = [actionsMenu insertItemWithTitle:@"Remove Dead Tracks in iTunes"
|
||||||
|
action:@selector(removeDeadTracks:) keyEquivalent:@"" atIndex:3];
|
||||||
|
[mi setTarget:result];
|
||||||
|
[super applicationDidFinishLaunching:aNotification];
|
||||||
|
}
|
||||||
|
|
||||||
- (void)applicationWillBecomeActive:(NSNotification *)aNotification
|
- (void)applicationWillBecomeActive:(NSNotification *)aNotification
|
||||||
{
|
{
|
||||||
if (![[result window] isVisible])
|
if (![[result window] isVisible])
|
||||||
|
@ -7,6 +7,8 @@
|
|||||||
import objc
|
import objc
|
||||||
from Foundation import NSObject
|
from Foundation import NSObject
|
||||||
|
|
||||||
|
from hsutil.cocoa import signature
|
||||||
|
|
||||||
from core_me.app_cocoa import DupeGuruME
|
from core_me.app_cocoa import DupeGuruME
|
||||||
from core.scanner import (SCAN_TYPE_FILENAME, SCAN_TYPE_FIELDS, SCAN_TYPE_FIELDS_NO_ORDER,
|
from core.scanner import (SCAN_TYPE_FILENAME, SCAN_TYPE_FIELDS, SCAN_TYPE_FIELDS_NO_ORDER,
|
||||||
SCAN_TYPE_TAG, SCAN_TYPE_CONTENT, SCAN_TYPE_CONTENT_AUDIO)
|
SCAN_TYPE_TAG, SCAN_TYPE_CONTENT, SCAN_TYPE_CONTENT_AUDIO)
|
||||||
@ -133,7 +135,7 @@ class PyDupeGuru(PyApp):
|
|||||||
self.app.sort_groups(key,asc)
|
self.app.sort_groups(key,asc)
|
||||||
|
|
||||||
#---Information
|
#---Information
|
||||||
@objc.signature('i@:')
|
@signature('i@:')
|
||||||
def deadTrackCount(self):
|
def deadTrackCount(self):
|
||||||
return len(self.app.dead_tracks)
|
return len(self.app.dead_tracks)
|
||||||
|
|
||||||
@ -150,11 +152,11 @@ class PyDupeGuru(PyApp):
|
|||||||
return self.app.last_op_error_count
|
return self.app.last_op_error_count
|
||||||
|
|
||||||
#---Data
|
#---Data
|
||||||
@objc.signature('i@:i')
|
@signature('i@:i')
|
||||||
def getOutlineViewMaxLevel_(self, tag):
|
def getOutlineViewMaxLevel_(self, tag):
|
||||||
return self.app.GetOutlineViewMaxLevel(tag)
|
return self.app.GetOutlineViewMaxLevel(tag)
|
||||||
|
|
||||||
@objc.signature('@@:i@')
|
@signature('@@:i@')
|
||||||
def getOutlineView_childCountsForPath_(self, tag, node_path):
|
def getOutlineView_childCountsForPath_(self, tag, node_path):
|
||||||
return self.app.GetOutlineViewChildCounts(tag, node_path)
|
return self.app.GetOutlineViewChildCounts(tag, node_path)
|
||||||
|
|
||||||
@ -231,11 +233,11 @@ class PyDupeGuru(PyApp):
|
|||||||
def demoLimitDescription(self):
|
def demoLimitDescription(self):
|
||||||
return self.app.DEMO_LIMIT_DESC
|
return self.app.DEMO_LIMIT_DESC
|
||||||
|
|
||||||
@objc.signature('i@:')
|
@signature('i@:')
|
||||||
def isRegistered(self):
|
def isRegistered(self):
|
||||||
return self.app.registered
|
return self.app.registered
|
||||||
|
|
||||||
@objc.signature('i@:@@')
|
@signature('i@:@@')
|
||||||
def isCodeValid_withEmail_(self, code, email):
|
def isCodeValid_withEmail_(self, code, email):
|
||||||
return self.app.is_code_valid(code, email)
|
return self.app.is_code_valid(code, email)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user