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:
@@ -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)
|
||||
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user