1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2026-02-05 12:51:39 +00:00

Merge PE into SE

This commit is contained in:
Virgil Dupras
2016-05-30 22:27:59 -04:00
parent 7d749779f2
commit c865f84c16
12 changed files with 129 additions and 410 deletions

View File

@@ -127,7 +127,11 @@ class DirectoriesDialog(QMainWindow):
label = QLabel(tr("Application Mode:"), self)
label.setSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
hl.addWidget(label)
self.appModeRadioBox = RadioBox(self, items=[tr("Standard"), tr("Music")], spread=False)
self.appModeRadioBox = RadioBox(
self,
items=[tr("Standard"), tr("Music"), tr("Picture")],
spread=False
)
hl.addWidget(self.appModeRadioBox)
self.verticalLayout.addLayout(hl)
hl = QHBoxLayout()
@@ -240,7 +244,9 @@ class DirectoriesDialog(QMainWindow):
self.recentFolders.insertItem(dirpath)
def appModeButtonSelected(self, index):
if index == 1:
if index == 2:
mode = AppMode.Picture
elif index == 1:
mode = AppMode.Music
else:
mode = AppMode.Standard

View File

@@ -92,13 +92,17 @@ class Preferences(PreferencesBase):
# scan_type is special because we save it immediately when we set it.
def get_scan_type(self, app_mode):
if app_mode == AppMode.Music:
if app_mode == AppMode.Picture:
return self.get_value('ScanTypePicture', ScanType.FuzzyBlock)
elif app_mode == AppMode.Music:
return self.get_value('ScanTypeMusic', ScanType.Tag)
else:
return self.get_value('ScanTypeStandard', ScanType.Contents)
def set_scan_type(self, app_mode, value):
if app_mode == AppMode.Music:
if app_mode == AppMode.Picture:
self.set_value('ScanTypePicture', value)
elif app_mode == AppMode.Music:
self.set_value('ScanTypeMusic', value)
else:
self.set_value('ScanTypeStandard', value)