Converted PE's preference panel to xibless and thus completed its transition to waf-based building.

--HG--
branch : xibless
This commit is contained in:
Virgil Dupras 2012-07-29 10:38:29 -04:00
parent cb35dc7897
commit f08b593acb
7 changed files with 48 additions and 2881 deletions

View File

@ -137,6 +137,11 @@
"Genre" = "Genre";
"Year" = "Year";
"dupeGuru PE Preferences" = "dupeGuru PE Preferences";
"Match pictures of different dimensions" = "Match pictures of different dimensions";
"EXIF Timestamp" = "EXIF Timestamp";
"Contents" = "Contents";
/* Main Menu */
"Bring All to Front" = "Bring All to Front";
"Window" = "Window";

View File

@ -7,7 +7,7 @@ dialogTitles = {
dialogHeights = {
'se': 345,
'me': 365,
'pe': 270,
'pe': 275,
}
scanTypeNames = {
'se': ["Filename", "Content", "Folders"],
@ -29,8 +29,11 @@ fewerResultsLabel = Label(basicTab.view, "Fewer results")
thresholdValuelabel = Label(basicTab.view, "")
fontSizeCombo = Combobox(basicTab.view, ["11", "12", "13", "14", "18", "24"])
fontSizeLabel = Label(basicTab.view, "Font Size:")
wordWeightingBox = Checkbox(basicTab.view, "Word weighting")
matchSimilarWordsBox = Checkbox(basicTab.view, "Match similar words")
if edition in ('se', 'me'):
wordWeightingBox = Checkbox(basicTab.view, "Word weighting")
matchSimilarWordsBox = Checkbox(basicTab.view, "Match similar words")
elif edition == 'pe':
matchDifferentDimensionsBox = Checkbox(basicTab.view, "Match pictures of different dimensions")
mixKindBox = Checkbox(basicTab.view, "Can mix file kind")
removeEmptyFoldersBox = Checkbox(basicTab.view, "Remove empty folders on delete or move")
checkForUpdatesBox = Checkbox(basicTab.view, "Automatically check for updates")
@ -62,8 +65,6 @@ scanTypePopup.bind('selectedIndex', defaults, 'values.scanType')
thresholdSlider.bind('value', defaults, 'values.minMatchPercentage')
thresholdValuelabel.bind('value', defaults, 'values.minMatchPercentage')
fontSizeCombo.bind('value', defaults, 'values.TableFontSize')
wordWeightingBox.bind('value', defaults, 'values.wordWeighting')
matchSimilarWordsBox.bind('value', defaults, 'values.matchSimilarWords')
mixKindBox.bind('value', defaults, 'values.mixFileKind')
removeEmptyFoldersBox.bind('value', defaults, 'values.removeEmptyFolders')
checkForUpdatesBox.bind('value', defaults, 'values.SUEnableAutomaticChecks')
@ -72,34 +73,42 @@ ignoreHardlinksBox.bind('value', defaults, 'values.ignoreHardlinkMatches')
debugModeCheckbox.bind('value', defaults, 'values.DebugMode')
customCommandText.bind('value', defaults, 'values.CustomCommand')
copyMovePopup.bind('selectedIndex', defaults, 'values.recreatePathType')
disableWhenContentScan = [thresholdSlider, wordWeightingBox, matchSimilarWordsBox]
for control in disableWhenContentScan:
control.bind('enabled', defaults, 'values.scanType', valueTransformer='vtScanTypeIsNotContent')
if edition == 'se':
ignoreSmallFilesBox.bind('value', defaults, 'values.ignoreSmallFiles')
smallFilesThresholdText.bind('value', defaults, 'values.smallFileThreshold')
elif edition == 'me':
for box in tagBoxes:
box.bind('enabled', defaults, 'values.scanType', valueTransformer='vtScanTypeIsTag')
trackBox.bind('value', defaults, 'values.scanTagTrack')
artistBox.bind('value', defaults, 'values.scanTagArtist')
albumBox.bind('value', defaults, 'values.scanTagAlbum')
titleBox.bind('value', defaults, 'values.scanTagTitle')
genreBox.bind('value', defaults, 'values.scanTagGenre')
yearBox.bind('value', defaults, 'values.scanTagYear')
if edition in ('se', 'me'):
wordWeightingBox.bind('value', defaults, 'values.wordWeighting')
matchSimilarWordsBox.bind('value', defaults, 'values.matchSimilarWords')
disableWhenContentScan = [thresholdSlider, wordWeightingBox, matchSimilarWordsBox]
for control in disableWhenContentScan:
control.bind('enabled', defaults, 'values.scanType', valueTransformer='vtScanTypeIsNotContent')
if edition == 'se':
ignoreSmallFilesBox.bind('value', defaults, 'values.ignoreSmallFiles')
smallFilesThresholdText.bind('value', defaults, 'values.smallFileThreshold')
elif edition == 'me':
for box in tagBoxes:
box.bind('enabled', defaults, 'values.scanType', valueTransformer='vtScanTypeIsTag')
trackBox.bind('value', defaults, 'values.scanTagTrack')
artistBox.bind('value', defaults, 'values.scanTagArtist')
albumBox.bind('value', defaults, 'values.scanTagAlbum')
titleBox.bind('value', defaults, 'values.scanTagTitle')
genreBox.bind('value', defaults, 'values.scanTagGenre')
yearBox.bind('value', defaults, 'values.scanTagYear')
elif edition == 'pe':
matchDifferentDimensionsBox.bind('value', defaults, 'values.matchScaled')
thresholdSlider.bind('enabled', defaults, 'values.scanType', valueTransformer='vtScanTypeIsFuzzy')
result.canResize = False
result.canMinimize = False
allLabels = [scanTypeLabel, thresholdValuelabel, moreResultsLabel, fewerResultsLabel,
thresholdLabel, fontSizeLabel, customCommandLabel, copyMoveLabel]
allCheckboxes = [wordWeightingBox, matchSimilarWordsBox, mixKindBox, removeEmptyFoldersBox,
checkForUpdatesBox, regexpCheckbox, ignoreHardlinksBox, debugModeCheckbox]
allCheckboxes = [mixKindBox, removeEmptyFoldersBox, checkForUpdatesBox, regexpCheckbox,
ignoreHardlinksBox, debugModeCheckbox]
if edition == 'se':
allLabels += [smallFilesThresholdSuffixLabel]
allCheckboxes += [ignoreSmallFilesBox]
allCheckboxes += [ignoreSmallFilesBox, wordWeightingBox, matchSimilarWordsBox]
elif edition == 'me':
allLabels += [tagsToScanLabel]
allCheckboxes += tagBoxes
allCheckboxes += tagBoxes + [wordWeightingBox, matchSimilarWordsBox]
elif edition == 'pe':
allCheckboxes += [matchDifferentDimensionsBox]
for label in allLabels:
label.controlSize = ControlSize.Small
fewerResultsLabel.alignment = TextAlignment.Right
@ -153,11 +162,15 @@ if edition == 'me':
else:
viewToPackCheckboxesUnder = fontSizeCombo
checkboxesToLayout = [wordWeightingBox, matchSimilarWordsBox, mixKindBox, removeEmptyFoldersBox]
if edition == 'se':
checkboxesToLayout.append(ignoreSmallFilesBox)
else:
checkboxesToLayout.append(checkForUpdatesBox)
checkboxesToLayout = [wordWeightingBox, matchSimilarWordsBox, mixKindBox, removeEmptyFoldersBox,
ignoreSmallFilesBox]
elif edition == 'me':
checkboxesToLayout = [wordWeightingBox, matchSimilarWordsBox, mixKindBox, removeEmptyFoldersBox,
checkForUpdatesBox]
elif edition == 'pe':
checkboxesToLayout = [matchDifferentDimensionsBox, mixKindBox, removeEmptyFoldersBox,
checkForUpdatesBox]
checkboxLayout = VLayout(checkboxesToLayout)
checkboxLayout.packRelativeTo(viewToPackCheckboxesUnder, Pack.Below)
checkboxLayout.fill(Pack.Left)

View File

@ -5,7 +5,7 @@
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<string>dupeGuru</string>
<key>CFBundleHelpBookFolder</key>
<string>dupeguru_pe_help</string>
<key>CFBundleHelpBookName</key>
@ -17,7 +17,7 @@
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<string>dupeGuru PE</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:dupeguru.xcodeproj">
</FileRef>
</Workspace>

View File

@ -1,69 +0,0 @@
/* Class = "NSWindow"; title = "dupeGuru PE Preferences"; ObjectID = "2"; */
"2.title" = "dupeGuru PE Preferences";
/* Class = "NSTextFieldCell"; title = "More results"; ObjectID = "18"; */
"18.title" = "More results";
/* Class = "NSTextFieldCell"; title = "Fewer results"; ObjectID = "19"; */
"19.title" = "Fewer results";
/* Class = "NSTextFieldCell"; title = "Filter hardness:"; ObjectID = "20"; */
"20.title" = "Filter hardness:";
/* Class = "NSButtonCell"; title = "Can mix file kind"; ObjectID = "21"; */
"21.title" = "Can mix file kind";
/* Class = "NSButtonCell"; title = "Reset to Defaults"; ObjectID = "24"; */
"24.title" = "Reset to Defaults";
/* Class = "NSTextFieldCell"; title = "Copy and Move:"; ObjectID = "25"; */
"25.title" = "Copy and Move:";
/* Class = "NSMenuItem"; title = "Recreate relative path"; ObjectID = "28"; */
"28.title" = "Recreate relative path";
/* Class = "NSMenuItem"; title = "Recreate absolute path"; ObjectID = "29"; */
"29.title" = "Recreate absolute path";
/* Class = "NSMenuItem"; title = "Right in destination"; ObjectID = "30"; */
"30.title" = "Right in destination";
/* Class = "NSButtonCell"; title = "Match pictures of different dimensions"; ObjectID = "31"; */
"31.title" = "Match pictures of different dimensions";
/* Class = "NSButtonCell"; title = "Automatically check for updates"; ObjectID = "32"; */
"32.title" = "Automatically check for updates";
/* Class = "NSButtonCell"; title = "Remove empty folders on delete or move"; ObjectID = "33"; */
"33.title" = "Remove empty folders on delete or move";
/* Class = "NSButtonCell"; title = "Use regular expressions when filtering"; ObjectID = "34"; */
"34.title" = "Use regular expressions when filtering";
/* Class = "NSTabViewItem"; label = "Basic"; ObjectID = "60"; */
"60.label" = "Basic";
/* Class = "NSTabViewItem"; label = "Advanced"; ObjectID = "61"; */
"61.label" = "Advanced";
/* Class = "NSTextFieldCell"; title = "Custom Command (arguments: %d for dupe, %r for ref):"; ObjectID = "65"; */
"65.title" = "Custom Command (arguments: %d for dupe, %r for ref):";
/* Class = "NSButtonCell"; title = "Ignore duplicates hardlinking to the same file"; ObjectID = "70"; */
"70.title" = "Ignore duplicates hardlinking to the same file";
/* Class = "NSButtonCell"; title = "Debug mode (restart required)"; ObjectID = "75"; */
"75.title" = "Debug mode (restart required)";
/* Class = "NSMenuItem"; title = "EXIF Timestamp"; ObjectID = "92"; */
"92.title" = "EXIF Timestamp";
/* Class = "NSMenuItem"; title = "Contents"; ObjectID = "93"; */
"93.title" = "Contents";
/* Class = "NSTextFieldCell"; title = "Scan type:"; ObjectID = "94"; */
"94.title" = "Scan type:";
/* Class = "NSTextFieldCell"; title = "Font size:"; ObjectID = "104"; */
"104.title" = "Font size:";

File diff suppressed because it is too large Load Diff