1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2026-01-22 14:41:39 +00:00

[#12] Added the Custom Command preference on the Qt side.

This commit is contained in:
Virgil Dupras
2010-04-13 09:02:09 +01:00
parent 5c80ac1c74
commit 7346b422d5
7 changed files with 54 additions and 19 deletions

View File

@@ -50,6 +50,7 @@ class PreferencesDialog(QDialog, Ui_PreferencesDialog):
setchecked(self.ignoreSmallFilesBox, prefs.ignore_small_files)
self.sizeThresholdEdit.setText(unicode(prefs.small_file_threshold))
self.copyMoveDestinationComboBox.setCurrentIndex(prefs.destination_type)
self.customCommandEdit.setText(prefs.custom_command)
def save(self):
prefs = self.app.prefs
@@ -64,6 +65,7 @@ class PreferencesDialog(QDialog, Ui_PreferencesDialog):
prefs.ignore_small_files = ischecked(self.ignoreSmallFilesBox)
prefs.small_file_threshold = tryint(self.sizeThresholdEdit.text())
prefs.destination_type = self.copyMoveDestinationComboBox.currentIndex()
prefs.custom_command = unicode(self.customCommandEdit.text())
def resetToDefaults(self):
self.load(preferences.Preferences())

View File

@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>449</width>
<height>312</height>
<width>308</width>
<height>361</height>
</rect>
</property>
<property name="windowTitle">
@@ -19,9 +19,9 @@
<property name="modal">
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout" stretch="1,0">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="0,0,0,1">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
@@ -174,15 +174,6 @@
</size>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<property name="spacing">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QCheckBox" name="wordWeightingBox">
<property name="text">
@@ -220,9 +211,6 @@
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing">
<number>0</number>
</property>
<item>
<widget class="QCheckBox" name="ignoreSmallFilesBox">
<property name="text">
@@ -319,6 +307,16 @@
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="label_7">
<property name="text">
<string>Custom Command (arguments: %d for dupe, %r for ref):</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="customCommandEdit"/>
</item>
</layout>
</item>
<item>