1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2026-01-22 06:37:17 +00:00

Converted to py3k. There's probably some bugs still. So far, I managed to run dupeGuru SE under pyobjc and qt.

This commit is contained in:
Virgil Dupras
2010-08-11 16:39:06 +02:00
parent fb79daad6a
commit 854d194f88
57 changed files with 394 additions and 338 deletions

View File

@@ -41,14 +41,14 @@ class File(fs.File):
fs.File._read_info(self, field)
if field == 'dimensions':
try:
im = PIL.Image.open(unicode(self.path))
im = PIL.Image.open(str(self.path))
self.dimensions = im.size
except IOError:
self.dimensions = (0, 0)
logging.warning(u"Could not read image '%s'", unicode(self.path))
logging.warning("Could not read image '%s'", str(self.path))
def get_blocks(self, block_count_per_side):
image = QImage(unicode(self.path))
image = QImage(str(self.path))
image = image.convertToFormat(QImage.Format_RGB888)
return getblocks(image, block_count_per_side)

View File

@@ -28,11 +28,11 @@ class DetailsDialog(DetailsDialogBase, Ui_DetailsDialog):
group = self.app.results.get_group_of_duplicate(dupe)
ref = group.ref
self.selectedPixmap = QPixmap(unicode(dupe.path))
self.selectedPixmap = QPixmap(str(dupe.path))
if ref is dupe:
self.referencePixmap = None
else:
self.referencePixmap = QPixmap(unicode(ref.path))
self.referencePixmap = QPixmap(str(ref.path))
self._updateImages()
def _updateImages(self):

View File

@@ -15,7 +15,7 @@ def move(src, dst):
return
if op.exists(dst):
os.remove(dst)
print 'Moving %s --> %s' % (src, dst)
print('Moving %s --> %s' % (src, dst))
os.rename(src, dst)
os.chdir('modules')

View File

@@ -46,7 +46,7 @@ class PreferencesDialog(QDialog, Ui_PreferencesDialog):
prefs.use_regexp = ischecked(self.useRegexpBox)
prefs.remove_empty_folders = ischecked(self.removeEmptyFoldersBox)
prefs.destination_type = self.copyMoveDestinationComboBox.currentIndex()
prefs.custom_command = unicode(self.customCommandEdit.text())
prefs.custom_command = str(self.customCommandEdit.text())
def resetToDefaults(self):
self.load(preferences.Preferences())