mirror of
https://github.com/arsenetar/dupeguru.git
synced 2026-01-22 06:37:17 +00:00
[#92 state:fixed] Added an option to ignore duplicates hardlinking to the same file.
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
# which should be included with this package. The terms are also available at
|
||||
# http://www.hardcoded.net/licenses/hs_license
|
||||
|
||||
import sys
|
||||
from PyQt4.QtCore import SIGNAL, Qt
|
||||
from PyQt4.QtGui import QDialog, QDialogButtonBox
|
||||
|
||||
@@ -35,6 +36,9 @@ class PreferencesDialog(QDialog, Ui_PreferencesDialog):
|
||||
|
||||
def _setupUi(self):
|
||||
self.setupUi(self)
|
||||
if sys.platform not in {'darwin', 'linux2'}:
|
||||
self.verticalLayout.removeWidget(self.ignoreHardlinkMatches)
|
||||
self.ignoreHardlinkMatches.setHidden(True)
|
||||
|
||||
def load(self, prefs=None):
|
||||
if prefs is None:
|
||||
@@ -53,6 +57,7 @@ class PreferencesDialog(QDialog, Ui_PreferencesDialog):
|
||||
setchecked(self.matchSimilarBox, prefs.match_similar)
|
||||
setchecked(self.wordWeightingBox, prefs.word_weighting)
|
||||
setchecked(self.mixFileKindBox, prefs.mix_file_kind)
|
||||
setchecked(self.ignoreHardlinkMatches, prefs.ignore_hardlink_matches)
|
||||
setchecked(self.useRegexpBox, prefs.use_regexp)
|
||||
setchecked(self.removeEmptyFoldersBox, prefs.remove_empty_folders)
|
||||
self.copyMoveDestinationComboBox.setCurrentIndex(prefs.destination_type)
|
||||
@@ -72,6 +77,7 @@ class PreferencesDialog(QDialog, Ui_PreferencesDialog):
|
||||
prefs.match_similar = ischecked(self.matchSimilarBox)
|
||||
prefs.word_weighting = ischecked(self.wordWeightingBox)
|
||||
prefs.mix_file_kind = ischecked(self.mixFileKindBox)
|
||||
prefs.ignore_hardlink_matches = ischecked(self.ignoreHardlinkMatches)
|
||||
prefs.use_regexp = ischecked(self.useRegexpBox)
|
||||
prefs.remove_empty_folders = ischecked(self.removeEmptyFoldersBox)
|
||||
prefs.destination_type = self.copyMoveDestinationComboBox.currentIndex()
|
||||
|
||||
@@ -310,6 +310,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="ignoreHardlinkMatches">
|
||||
<property name="text">
|
||||
<string>Ignore duplicates hardlinking to the same file</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
|
||||
Reference in New Issue
Block a user