2010-01-01 20:11:34 +00:00
|
|
|
# Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
|
2009-08-05 08:59:46 +00:00
|
|
|
#
|
|
|
|
# This software is licensed under the "HS" License as described in the "LICENSE" file,
|
|
|
|
# which should be included with this package. The terms are also available at
|
|
|
|
# http://www.hardcoded.net/licenses/hs_license
|
|
|
|
|
2010-02-03 10:55:53 +00:00
|
|
|
from core.app_cocoa_inter import PyDupeGuruBase
|
2009-12-30 10:37:57 +00:00
|
|
|
from core_pe import app_cocoa as app_pe_cocoa
|
2009-06-01 09:55:11 +00:00
|
|
|
|
2009-06-06 12:11:11 +00:00
|
|
|
# Fix py2app imports which chokes on relative imports
|
2009-12-30 10:37:57 +00:00
|
|
|
from core_pe import block, cache, matchbase, data
|
2009-06-01 09:55:11 +00:00
|
|
|
|
2010-02-03 10:55:53 +00:00
|
|
|
class PyDupeGuru(PyDupeGuruBase):
|
2009-06-01 09:55:11 +00:00
|
|
|
def init(self):
|
2010-02-03 10:55:53 +00:00
|
|
|
self = super(PyDupeGuru, self).init()
|
2009-06-01 09:55:11 +00:00
|
|
|
self.app = app_pe_cocoa.DupeGuruPE()
|
|
|
|
return self
|
|
|
|
|
|
|
|
def clearPictureCache(self):
|
2010-01-14 15:14:26 +00:00
|
|
|
self.app.scanner.clear_picture_cache()
|
2009-06-01 09:55:11 +00:00
|
|
|
|
2010-02-03 10:55:53 +00:00
|
|
|
#---Information
|
2009-06-01 09:55:11 +00:00
|
|
|
def getSelectedDupePath(self):
|
|
|
|
return unicode(self.app.selected_dupe_path())
|
|
|
|
|
|
|
|
def getSelectedDupeRefPath(self):
|
|
|
|
return unicode(self.app.selected_dupe_ref_path())
|
|
|
|
|
|
|
|
#---Properties
|
|
|
|
def setMatchScaled_(self,match_scaled):
|
2009-10-18 09:29:33 +00:00
|
|
|
self.app.scanner.match_scaled = match_scaled
|
2009-06-01 09:55:11 +00:00
|
|
|
|
|
|
|
def setMinMatchPercentage_(self,percentage):
|
2009-10-18 09:29:33 +00:00
|
|
|
self.app.scanner.threshold = int(percentage)
|
2009-06-01 09:55:11 +00:00
|
|
|
|
|
|
|
#---Registration
|
2010-01-13 08:30:10 +00:00
|
|
|
def appName(self):
|
|
|
|
return "dupeGuru Picture Edition"
|
|
|
|
|