mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-09 13:24:35 +00:00
Merge heads.
This commit is contained in:
commit
39a601e393
@ -105,7 +105,7 @@
|
||||
"Quick Look" = "Quick Look";
|
||||
"Quit dupeGuru" = "Quit dupeGuru";
|
||||
"Re-Prioritize duplicates" = "Re-Prioritize duplicates";
|
||||
"Re-Prioritize Results" = "Re-Prioritize Results";
|
||||
"Re-Prioritize Results..." = "Re-Prioritize Results...";
|
||||
"Recreate absolute path" = "Recreate absolute path";
|
||||
"Recreate relative path" = "Recreate relative path";
|
||||
"Reference" = "Reference";
|
||||
|
@ -52,7 +52,7 @@ actionMenu.addItem("Send Marked to Trash...", Action(None, 'trashMarked'), 'cmd+
|
||||
actionMenu.addItem("Move Marked to...", Action(None, 'moveMarked'), 'cmd+m')
|
||||
actionMenu.addItem("Copy Marked to...", Action(None, 'copyMarked'), 'cmd+alt+m')
|
||||
actionMenu.addItem("Remove Marked from Results", Action(None, 'removeMarked'), 'cmd+r')
|
||||
actionMenu.addItem("Re-Prioritize Results", Action(None, 'reprioritizeResults'))
|
||||
actionMenu.addItem("Re-Prioritize Results...", Action(None, 'reprioritizeResults'))
|
||||
actionMenu.addSeparator()
|
||||
actionMenu.addItem("Remove Selected from Results", Action(None, 'removeSelected'), 'cmd+backspace')
|
||||
actionMenu.addItem("Add Selected to Ignore List", Action(None, 'ignoreSelected'), 'cmd+g')
|
||||
|
10
core/app.py
10
core/app.py
@ -442,14 +442,16 @@ class DupeGuru(RegistrableApplication, Broadcaster):
|
||||
for dupe in dupes:
|
||||
g = self.results.get_group_of_duplicate(dupe)
|
||||
if g not in changed_groups:
|
||||
self.results.make_ref(dupe)
|
||||
changed_groups.add(g)
|
||||
if self.results.make_ref(dupe):
|
||||
changed_groups.add(g)
|
||||
# It's not always obvious to users what this action does, so to make it a bit clearer,
|
||||
# we change our selection to the ref of all changed groups. However, we also want to keep
|
||||
# the files that were ref before and weren't changed by the action. In effect, what this
|
||||
# does is that we keep our old selection, but remove all non-ref dupes from it.
|
||||
self.selected_dupes = [d for d in self.selected_dupes
|
||||
if self.results.get_group_of_duplicate(d).ref is d]
|
||||
# If no group was changed, however, we don't touch the selection.
|
||||
if changed_groups:
|
||||
self.selected_dupes = [d for d in self.selected_dupes
|
||||
if self.results.get_group_of_duplicate(d).ref is d]
|
||||
self.notify('results_changed')
|
||||
|
||||
def mark_all(self):
|
||||
|
@ -325,14 +325,15 @@ class Group:
|
||||
|
||||
def switch_ref(self, with_dupe):
|
||||
if self.ref.is_ref:
|
||||
return
|
||||
return False
|
||||
try:
|
||||
self.ordered.remove(with_dupe)
|
||||
self.ordered.insert(0, with_dupe)
|
||||
self._percentage = None
|
||||
self._matches_for_ref = None
|
||||
return True
|
||||
except ValueError:
|
||||
pass
|
||||
return False
|
||||
|
||||
dupes = property(lambda self: self[1:])
|
||||
|
||||
|
@ -244,8 +244,9 @@ class Results(Markable):
|
||||
def make_ref(self, dupe):
|
||||
g = self.get_group_of_duplicate(dupe)
|
||||
r = g.ref
|
||||
if not g.switch_ref(dupe):
|
||||
return False
|
||||
self._remove_mark_flag(dupe)
|
||||
g.switch_ref(dupe);
|
||||
if not r.is_ref:
|
||||
self.__total_count += 1
|
||||
self.__total_size += r.size
|
||||
@ -254,6 +255,7 @@ class Results(Markable):
|
||||
self.__total_size -= dupe.size
|
||||
self.__dupes = None
|
||||
self.is_modified = True
|
||||
return True
|
||||
|
||||
def perform_on_marked(self, func, remove_from_results):
|
||||
# Performs `func` on all marked dupes. If an EnvironmentError is raised during the call,
|
||||
|
@ -72,23 +72,23 @@ msgstr ""
|
||||
msgid "You have no custom command set up. Set it up in your preferences."
|
||||
msgstr ""
|
||||
|
||||
#: core/app.py:502 core/app.py:513
|
||||
#: core/app.py:504 core/app.py:515
|
||||
msgid "You are about to remove %d files from results. Continue?"
|
||||
msgstr ""
|
||||
|
||||
#: core/app.py:533
|
||||
#: core/app.py:535
|
||||
msgid "{} duplicate groups were changed by the re-prioritization."
|
||||
msgstr ""
|
||||
|
||||
#: core/app.py:553
|
||||
#: core/app.py:555
|
||||
msgid "Collecting files to scan"
|
||||
msgstr ""
|
||||
|
||||
#: core/app.py:564
|
||||
#: core/app.py:566
|
||||
msgid "The selected directories contain no scannable file."
|
||||
msgstr ""
|
||||
|
||||
#: core/app.py:603
|
||||
#: core/app.py:605
|
||||
msgid "%s (%d discarded)"
|
||||
msgstr ""
|
||||
|
||||
@ -104,7 +104,7 @@ msgstr ""
|
||||
msgid "Read size of %d/%d files"
|
||||
msgstr ""
|
||||
|
||||
#: core/engine.py:360
|
||||
#: core/engine.py:361
|
||||
msgid "Grouped %d/%d matches"
|
||||
msgstr ""
|
||||
|
||||
|
@ -118,7 +118,7 @@ msgid ""
|
||||
"Wait a few seconds, then try again."
|
||||
msgstr ""
|
||||
|
||||
#: qt/base/app.py:261
|
||||
#: qt/base/app.py:257
|
||||
msgid "{} file (*.{})"
|
||||
msgstr ""
|
||||
|
||||
@ -241,7 +241,7 @@ msgstr ""
|
||||
msgid "All Files (*.*)"
|
||||
msgstr ""
|
||||
|
||||
#: qt/base/directories_dialog.py:206 qt/base/result_window.py:290
|
||||
#: qt/base/directories_dialog.py:206 qt/base/result_window.py:287
|
||||
msgid "dupeGuru Results (*.dupeguru)"
|
||||
msgstr ""
|
||||
|
||||
@ -392,7 +392,7 @@ msgstr ""
|
||||
msgid "Remove Marked from Results"
|
||||
msgstr ""
|
||||
|
||||
#: qt/base/result_window.py:52
|
||||
#: qt/base/result_window.py:52 cocoa/base/en.lproj/Localizable.strings:0
|
||||
msgid "Re-Prioritize Results..."
|
||||
msgstr ""
|
||||
|
||||
@ -476,7 +476,7 @@ msgstr ""
|
||||
msgid "Delta Values"
|
||||
msgstr ""
|
||||
|
||||
#: qt/base/result_window.py:289 cocoa/base/en.lproj/Localizable.strings:0
|
||||
#: qt/base/result_window.py:286 cocoa/base/en.lproj/Localizable.strings:0
|
||||
msgid "Select a file to save your results to"
|
||||
msgstr ""
|
||||
|
||||
@ -798,10 +798,6 @@ msgstr ""
|
||||
msgid "Quit dupeGuru"
|
||||
msgstr ""
|
||||
|
||||
#: cocoa/base/en.lproj/Localizable.strings:0
|
||||
msgid "Re-Prioritize Results"
|
||||
msgstr ""
|
||||
|
||||
#: cocoa/base/en.lproj/Localizable.strings:0
|
||||
msgid "Remove Dead Tracks in iTunes"
|
||||
msgstr ""
|
||||
|
Loading…
x
Reference in New Issue
Block a user