mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-10 05:34:36 +00:00
Got rid of some code duplication in Cocoa interface.
This commit is contained in:
parent
70689ce057
commit
e21627bbde
@ -11,7 +11,6 @@ from hscommon.cocoa import signature
|
||||
|
||||
from core.app_cocoa import PyDupeGuruBase, PyDetailsPanel
|
||||
from core_me.app_cocoa import DupeGuruME
|
||||
from core_me import __appname__
|
||||
from core.scanner import ScanType
|
||||
|
||||
class PyDupeGuru(PyDupeGuruBase):
|
||||
@ -60,7 +59,3 @@ class PyDupeGuru(PyDupeGuruBase):
|
||||
else:
|
||||
self.py.scanner.scanned_tags.discard(scan_tag)
|
||||
|
||||
#---Registration
|
||||
def appName(self):
|
||||
return __appname__
|
||||
|
||||
|
@ -8,7 +8,7 @@ from hscommon.trans import install_cocoa_trans
|
||||
install_cocoa_trans()
|
||||
|
||||
from core.app_cocoa import PyDupeGuruBase, PyDetailsPanel
|
||||
from core_pe import app_cocoa as app_pe_cocoa, __appname__
|
||||
from core_pe import app_cocoa as app_pe_cocoa
|
||||
from core.scanner import ScanType
|
||||
|
||||
class PyDupeGuru(PyDupeGuruBase):
|
||||
@ -43,7 +43,3 @@ class PyDupeGuru(PyDupeGuruBase):
|
||||
def setMinMatchPercentage_(self,percentage):
|
||||
self.py.scanner.threshold = int(percentage)
|
||||
|
||||
#---Registration
|
||||
def appName(self):
|
||||
return __appname__
|
||||
|
||||
|
@ -12,7 +12,6 @@ from hscommon.cocoa import signature
|
||||
from core.scanner import ScanType
|
||||
from core.app_cocoa import PyDupeGuruBase, PyDetailsPanel
|
||||
from core_se.app_cocoa import DupeGuru
|
||||
from core_se import __appname__
|
||||
|
||||
class PyDupeGuru(PyDupeGuruBase):
|
||||
def init(self):
|
||||
@ -44,7 +43,3 @@ class PyDupeGuru(PyDupeGuruBase):
|
||||
def setSizeThreshold_(self, size_threshold):
|
||||
self.py.scanner.size_threshold = size_threshold
|
||||
|
||||
#---Registration
|
||||
def appName(self):
|
||||
return __appname__
|
||||
|
||||
|
@ -180,6 +180,10 @@ class PyDupeGuruBase(PyFairware):
|
||||
def jobCompleted_(self, jobid):
|
||||
self.py._job_completed(jobid)
|
||||
|
||||
#---Registration
|
||||
def appName(self):
|
||||
return self.py.NAME
|
||||
|
||||
#--- model --> view
|
||||
def open_path(self, path):
|
||||
NSWorkspace.sharedWorkspace().openFile_(str(path))
|
||||
|
@ -11,10 +11,12 @@ from hscommon.util import format_size
|
||||
from core.app import (DupeGuru as DupeGuruBase, Column, format_time, format_timestamp,
|
||||
format_perc, format_words, format_dupe_count, cmp_value)
|
||||
from . import prioritize
|
||||
from . import __appname__
|
||||
|
||||
tr = lambda s: trbase(s, 'columns')
|
||||
|
||||
class DupeGuru(DupeGuruBase):
|
||||
NAME = __appname__
|
||||
COLUMNS = [
|
||||
Column('name', tr("Filename")),
|
||||
Column('folder_path', tr("Folder")),
|
||||
|
@ -11,6 +11,7 @@ from hscommon.util import format_size
|
||||
from core.app import (DupeGuru as DupeGuruBase, Column, format_timestamp, format_perc,
|
||||
format_dupe_count, cmp_value)
|
||||
from . import prioritize
|
||||
from . import __appname__
|
||||
|
||||
tr = lambda s: trbase(s, 'columns')
|
||||
|
||||
@ -21,6 +22,7 @@ def get_delta_dimensions(value, ref_value):
|
||||
return (value[0]-ref_value[0], value[1]-ref_value[1])
|
||||
|
||||
class DupeGuru(DupeGuruBase):
|
||||
NAME = __appname__
|
||||
COLUMNS = [
|
||||
Column('name', tr("Filename")),
|
||||
Column('folder_path', tr("Folder")),
|
||||
|
@ -11,10 +11,12 @@ from hscommon.util import format_size
|
||||
from core.app import (DupeGuru as DupeGuruBase, Column, format_timestamp, format_perc,
|
||||
format_words, format_dupe_count, cmp_value)
|
||||
from core import prioritize
|
||||
from . import __appname__
|
||||
|
||||
tr = lambda s: trbase(s, 'columns')
|
||||
|
||||
class DupeGuru(DupeGuruBase):
|
||||
NAME = __appname__
|
||||
COLUMNS = [
|
||||
Column('name', tr("Filename")),
|
||||
Column('folder_path', tr("Folder")),
|
||||
|
Loading…
x
Reference in New Issue
Block a user