mirror of
https://github.com/arsenetar/dupeguru.git
synced 2026-01-22 06:37:17 +00:00
Removed logic duplication across toolkit code in "Reveal Selected" action.
This commit is contained in:
@@ -126,6 +126,10 @@ class DupeGuru(DupeGuruBase, QObject):
|
||||
def _recycle_dupe(dupe):
|
||||
platform.recycle_file(dupe.path)
|
||||
|
||||
@staticmethod
|
||||
def _reveal_path(path):
|
||||
self._open_path(path[:-1])
|
||||
|
||||
def _start_job(self, jobid, func):
|
||||
title = JOBID2TITLE[jobid]
|
||||
try:
|
||||
@@ -210,12 +214,6 @@ class DupeGuru(DupeGuruBase, QObject):
|
||||
logging.warning("dupeGuru Warning: %s" % unicode(e))
|
||||
return False
|
||||
|
||||
def reveal_selected(self):
|
||||
if not self.selected_dupes:
|
||||
return
|
||||
url = QUrl.fromLocalFile(unicode(self.selected_dupe[0].path[:-1]))
|
||||
QDesktopServices.openUrl(url)
|
||||
|
||||
def select_dupes(self, dupes):
|
||||
self._select_dupes(dupes)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user