1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2026-01-23 07:01:39 +00:00

Refactoring: Created hscommon.desktop

This unit hosts previously awkward UI view methods which weren't related
to the view itself, but to the current desktop environment. These
functions are now at their appropriate place.
This commit is contained in:
Virgil Dupras
2013-10-12 13:54:13 -04:00
parent 2fdfacb34e
commit 33d9569427
10 changed files with 92 additions and 50 deletions

View File

@@ -1,7 +1,7 @@
import logging
from objp.util import pyref, dontwrap
from cocoa import install_exception_hook, install_cocoa_logger, patch_threaded_job_performer, proxy
from cocoa import install_exception_hook, install_cocoa_logger, patch_threaded_job_performer
from cocoa.inter import PyFairware, FairwareView
class DupeGuruView(FairwareView):
@@ -17,8 +17,7 @@ class PyDupeGuruBase(PyFairware):
install_exception_hook()
install_cocoa_logger()
patch_threaded_job_performer()
appdata = proxy.getAppdataPath()
self.model = modelclass(self, appdata)
self.model = modelclass(self)
#---Sub-proxies
def detailsPanel(self) -> pyref:
@@ -144,14 +143,6 @@ class PyDupeGuruBase(PyFairware):
self.model.options['copymove_dest_type'] = copymove_dest_type
#--- model --> view
@dontwrap
def open_path(self, path):
proxy.openPath_(str(path))
@dontwrap
def reveal_path(self, path):
proxy.revealPath_(str(path))
@dontwrap
def ask_yes_no(self, prompt):
return self.callback.askYesNoWithPrompt_(prompt)