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

Refactored the scan error message system which was too complicated, especially on cocoa. Replaced it with a simpler view.show_message(msg) call.

This commit is contained in:
Virgil Dupras
2011-09-22 10:35:17 -04:00
parent 669e4b390b
commit abe25d6967
27 changed files with 227 additions and 197 deletions

View File

@@ -42,7 +42,7 @@ class PyDupeGuruBase(PyFairware):
self.py.scanner.ignore_list.Clear()
def doScan(self):
return self.py.start_scanning()
self.py.start_scanning()
def exportToXHTMLwithColumns_(self, column_ids):
return self.py.export_to_xhtml(column_ids)
@@ -197,4 +197,8 @@ class PyDupeGuruBase(PyFairware):
NSUserDefaults.standardUserDefaults().setObject_forKey_(value, key_name)
def show_extra_fairware_reminder(self):
self.cocoa.showExtraFairwareReminder()
self.cocoa.showExtraFairwareReminder()
def show_message(self, msg):
self.cocoa.showMessage_(msg)

View File

@@ -17,7 +17,7 @@ from hscommon import io
from hscommon.util import remove_invalid_xml
from hscommon.path import Path
from hscommon.cocoa.objcmin import NSUserDefaults, NSURL
from hscommon.trans import tr
from hscommon.trans import tr, trmsg
from core import directories
from core_pe import _block_osx
@@ -189,11 +189,11 @@ class DupeGuruPE(DupeGuruBase):
return ref.path
def start_scanning(self):
result = DupeGuruBase.start_scanning(self)
if self.directories.has_iphoto_path():
try:
app('iPhoto')
except ApplicationNotFoundError:
return 4
return result
self.view.show_message(trmsg("IPhotoAppNotFoundMsg"))
return
DupeGuruBase.start_scanning(self)