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:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user