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

Allow "Open selected" to open more than one file at once.

When there's mpre than 10 selected dupes, a warning is shown, asking
confirmation. [#142 state:fixed]
This commit is contained in:
Virgil Dupras
2013-04-28 10:12:25 -04:00
parent 26d923e175
commit 0ced3e39c8
12 changed files with 271 additions and 206 deletions

View File

@@ -36,6 +36,8 @@ DEBUG_MODE_PREFERENCE = 'DebugMode'
MSG_NO_MARKED_DUPES = tr("There are no marked duplicates. Nothing has been done.")
MSG_NO_SELECTED_DUPES = tr("There are no selected duplicates. Nothing has been done.")
MSG_MANY_FILES_TO_OPEN = tr("You're about to open many files at once. Depending on what those "
"files are opened with, doing so can create quite a mess. Continue?")
class DestType:
Direct = 0
@@ -470,8 +472,11 @@ class DupeGuru(RegistrableApplication, Broadcaster):
self.notify('marking_changed')
def open_selected(self):
if self.selected_dupes:
self.view.open_path(self.selected_dupes[0].path)
if len(self.selected_dupes) > 10:
if not self.view.ask_yes_no(MSG_MANY_FILES_TO_OPEN):
return
for dupe in self.selected_dupes:
self.view.open_path(dupe.path)
def purge_ignore_list(self):
self.scanner.ignore_list.Filter(lambda f,s:op.exists(f) and op.exists(s))