From 0382ad1534c4e69dea106837634c8096f890099a Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Sat, 20 Nov 2010 12:42:15 +0100 Subject: [PATCH] Adapted to the job-related code moving to the 'jobprogress' package. --- README | 10 ++++++---- core/app_cocoa.py | 3 ++- core/engine.py | 2 +- core/results.py | 2 +- core/scanner.py | 2 +- core/tests/app_test.py | 2 +- core/tests/engine_test.py | 2 +- core/tests/scanner_test.py | 3 +-- core_pe/matchbase.py | 2 +- qt/base/app.py | 4 ++-- run_template_qt.py | 2 ++ 11 files changed, 19 insertions(+), 15 deletions(-) diff --git a/README b/README index 019d22a3..4f1cf723 100644 --- a/README +++ b/README @@ -13,6 +13,7 @@ There are also other sub-folder that comes from external repositories (automatic with svn:externals): - hscommon: A collection of helpers used across HS applications. +- hsgui: Cross-toolkit GUI-related helper classes. - cocoalib: A collection of helpers used across Cocoa UI codebases of HS applications. - qtlib: A collection of helpers used across Qt UI codebases of HS applications. @@ -25,9 +26,10 @@ General dependencies ----- - Python 3.1 (http://www.python.org) -- Send2Trash3k (http://hg.hardcoded.net/send2trash3k) -- hsutil3k (http://hg.hardcoded.net/hsutil3k) -- hsaudiotag3k (for ME) (http://hg.hardcoded.net/hsaudiotag3k) +- Send2Trash3k (http://hg.hardcoded.net/send2trash) +- hsutil3k (http://hg.hardcoded.net/hsutil) +- hsaudiotag3k (for ME) (http://hg.hardcoded.net/hsaudiotag) +- jobprogress (http://hg.hardcoded.net/jobprogress) - Markdown, to generate help files. (http://pypi.python.org/pypi/Markdown) - PyYaml, for help files and the build system. (http://pyyaml.org/) - py.test, to run unit tests. (http://codespeak.net/py/dist/test/) @@ -38,7 +40,7 @@ OS X prerequisites - XCode 3.1 (http://developer.apple.com/TOOLS/xcode/) - Sparkle (http://sparkle.andymatuschak.org/) - PyObjC 2.3. (http://pyobjc.sourceforge.net/) -- py2app 0.5.4 (http://svn.pythonmac.org/py2app/py2app/trunk/doc/index.html) +- py2app 0.5.4 (http://bitbucket.org/ronaldoussoren/py2app) Windows prerequisites --- diff --git a/core/app_cocoa.py b/core/app_cocoa.py index 381d520e..e5b4acec 100644 --- a/core/app_cocoa.py +++ b/core/app_cocoa.py @@ -9,7 +9,8 @@ import logging import os.path as op -from hscommon import cocoa, job +from jobprogress import job +from hscommon import cocoa from hscommon.cocoa import install_exception_hook from hscommon.cocoa.objcmin import (NSNotificationCenter, NSUserDefaults, NSSearchPathForDirectoriesInDomains, NSApplicationSupportDirectory, NSUserDomainMask, diff --git a/core/engine.py b/core/engine.py index b94d17ef..f0861362 100644 --- a/core/engine.py +++ b/core/engine.py @@ -16,7 +16,7 @@ from unicodedata import normalize from hsutil.misc import flatten from hsutil.str import multi_replace -from hscommon import job +from jobprogress import job (WEIGHT_WORDS, MATCH_SIMILAR_WORDS, diff --git a/core/results.py b/core/results.py index b4a21c09..9b3ced67 100644 --- a/core/results.py +++ b/core/results.py @@ -11,7 +11,7 @@ import re from xml.etree import ElementTree as ET from . import engine -from hscommon.job import nulljob +from jobprogress.job import nulljob from hscommon.markable import Markable from hsutil.misc import flatten, nonone from hsutil.str import format_size diff --git a/core/scanner.py b/core/scanner.py index 12b14003..8618c610 100644 --- a/core/scanner.py +++ b/core/scanner.py @@ -9,7 +9,7 @@ import logging import re -from hscommon import job +from jobprogress import job from hsutil import io from hsutil.misc import dedupe from hsutil.str import get_file_ext, rem_file_ext diff --git a/core/tests/app_test.py b/core/tests/app_test.py index 3603b3c5..115195fd 100644 --- a/core/tests/app_test.py +++ b/core/tests/app_test.py @@ -15,7 +15,7 @@ from hsutil import io from hsutil.path import Path from hsutil.decorators import log_calls import hsutil.files -from hscommon.job import nulljob +from jobprogress.job import nulljob from . import data from .results_test import GetTestGroups diff --git a/core/tests/engine_test.py b/core/tests/engine_test.py index 1ca4fd43..7071d509 100644 --- a/core/tests/engine_test.py +++ b/core/tests/engine_test.py @@ -8,7 +8,7 @@ import sys -from hscommon import job +from jobprogress import job from hsutil.decorators import log_calls from hsutil.misc import first from hsutil.testutil import eq_ diff --git a/core/tests/scanner_test.py b/core/tests/scanner_test.py index 59fec175..d3deed13 100644 --- a/core/tests/scanner_test.py +++ b/core/tests/scanner_test.py @@ -6,8 +6,7 @@ # which should be included with this package. The terms are also available at # http://www.hardcoded.net/licenses/bsd_license - -from hscommon import job +from jobprogress import job from hsutil import io from hsutil.path import Path from hsutil.testutil import eq_ diff --git a/core_pe/matchbase.py b/core_pe/matchbase.py index f7f58893..68675c49 100644 --- a/core_pe/matchbase.py +++ b/core_pe/matchbase.py @@ -10,7 +10,7 @@ import logging import multiprocessing from collections import defaultdict, deque -from hscommon import job +from jobprogress import job from core.engine import Match from .block import avgdiff, DifferentBlockCountError, NoBlocksError diff --git a/qt/base/app.py b/qt/base/app.py index 41af6932..0c7f8fea 100644 --- a/qt/base/app.py +++ b/qt/base/app.py @@ -15,12 +15,12 @@ import os.path as op from PyQt4.QtCore import QTimer, QObject, QCoreApplication, QUrl, SIGNAL, pyqtSignal from PyQt4.QtGui import QDesktopServices, QFileDialog, QDialog, QMessageBox -from hscommon import job +from jobprogress import job +from jobprogress.qt import Progress from core.app import DupeGuru as DupeGuruBase, JOB_SCAN, JOB_LOAD, JOB_MOVE, JOB_COPY, JOB_DELETE from qtlib.about_box import AboutBox -from qtlib.progress import Progress from qtlib.reg import Registration from . import platform diff --git a/run_template_qt.py b/run_template_qt.py index 9152271d..c521101c 100644 --- a/run_template_qt.py +++ b/run_template_qt.py @@ -12,6 +12,7 @@ sip.setapi('QVariant', 1) from PyQt4.QtCore import QCoreApplication from PyQt4.QtGui import QApplication, QIcon, QPixmap +from qtlib.error_report_dialog import install_excepthook from qt.base import dg_rc from qt.{{edition}}.app import DupeGuru @@ -25,4 +26,5 @@ if __name__ == "__main__": QCoreApplication.setApplicationName(DupeGuru.NAME) QCoreApplication.setApplicationVersion(DupeGuru.VERSION) dgapp = DupeGuru() + install_excepthook() sys.exit(app.exec_())