mirror of
https://github.com/arsenetar/dupeguru.git
synced 2026-01-22 06:37:17 +00:00
[#89 state:fixed] Added a Folders scan type in dgse.
--HG-- rename : core_se/tests/fs_test.py => core/tests/fs_test.py
This commit is contained in:
@@ -413,6 +413,10 @@
|
||||
<source>Contents</source>
|
||||
<translation>Contenu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Folders</source>
|
||||
<translation>Dossiers</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Filter Hardness:</source>
|
||||
<translation>Seuil du filtre:</translation>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
# http://www.hardcoded.net/licenses/bsd_license
|
||||
|
||||
from core_se import data, __appname__
|
||||
from core.directories import Directories as DirectoriesBase, STATE_EXCLUDED
|
||||
from core.directories import Directories as DirectoriesBase, DirectoryState
|
||||
|
||||
from ..base.app import DupeGuru as DupeGuruBase
|
||||
from .details_dialog import DetailsDialog
|
||||
@@ -21,7 +21,7 @@ class Directories(DirectoriesBase):
|
||||
if result is not None:
|
||||
return result
|
||||
if len(path) == 2 and path[1].lower() in self.ROOT_PATH_TO_EXCLUDE:
|
||||
return STATE_EXCLUDED
|
||||
return DirectoryState.Excluded
|
||||
|
||||
class DupeGuru(DupeGuruBase):
|
||||
EDITION = 'se'
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
# http://www.hardcoded.net/licenses/bsd_license
|
||||
|
||||
import sys
|
||||
from PyQt4.QtCore import SIGNAL, QSize
|
||||
from PyQt4.QtCore import QSize
|
||||
from PyQt4.QtGui import (QVBoxLayout, QHBoxLayout, QLabel, QComboBox, QSizePolicy, QSpacerItem,
|
||||
QWidget, QLineEdit, QApplication)
|
||||
|
||||
@@ -22,13 +22,14 @@ from . import preferences
|
||||
SCAN_TYPE_ORDER = [
|
||||
ScanType.Filename,
|
||||
ScanType.Contents,
|
||||
ScanType.Folders,
|
||||
]
|
||||
|
||||
class PreferencesDialog(PreferencesDialogBase):
|
||||
def __init__(self, parent, app):
|
||||
PreferencesDialogBase.__init__(self, parent, app)
|
||||
|
||||
self.connect(self.scanTypeComboBox, SIGNAL('currentIndexChanged(int)'), self.scanTypeChanged)
|
||||
self.scanTypeComboBox.currentIndexChanged[int].connect(self.scanTypeChanged)
|
||||
|
||||
def _setupPreferenceWidgets(self):
|
||||
self.horizontalLayout = QHBoxLayout()
|
||||
@@ -38,8 +39,8 @@ class PreferencesDialog(PreferencesDialogBase):
|
||||
self.label_2.setMaximumSize(QSize(100, 16777215))
|
||||
self.horizontalLayout.addWidget(self.label_2)
|
||||
self.scanTypeComboBox = QComboBox(self)
|
||||
self.scanTypeComboBox.addItem(tr("Filename"))
|
||||
self.scanTypeComboBox.addItem(tr("Contents"))
|
||||
for label in [tr("Filename"), tr("Contents"), tr("Folders")]:
|
||||
self.scanTypeComboBox.addItem(label)
|
||||
self.horizontalLayout.addWidget(self.scanTypeComboBox)
|
||||
self.widgetsVLayout.addLayout(self.horizontalLayout)
|
||||
self._setupFilterHardnessBox()
|
||||
|
||||
Reference in New Issue
Block a user