mirror of
https://github.com/arsenetar/dupeguru.git
synced 2026-01-22 22:51:39 +00:00
xibless-ified PrioritizeDialog.
--HG-- branch : xibless
This commit is contained in:
@@ -47,12 +47,13 @@ for button in (addButton, removeButton):
|
||||
for button in (loadResultsButton, scanButton):
|
||||
button.width = 118
|
||||
|
||||
buttonLayout = HLayout(left=[addButton, removeButton], right=[loadResultsButton, scanButton])
|
||||
buttonLayout = HLayout([addButton, removeButton, None, loadResultsButton, scanButton])
|
||||
promptLabel.packToCorner(Pack.UpperLeft)
|
||||
promptLabel.fill(Pack.Right)
|
||||
directoryOutline.packRelativeTo(promptLabel, Pack.Below)
|
||||
buttonLayout.packRelativeTo(directoryOutline, Pack.Below, margin=8)
|
||||
directoryOutline.fill(Pack.LowerRight)
|
||||
buttonLayout.fill(Pack.Right)
|
||||
|
||||
promptLabel.setAnchor(Pack.UpperLeft, growX=True)
|
||||
directoryOutline.setAnchor(Pack.UpperLeft, growX=True, growY=True)
|
||||
|
||||
@@ -21,7 +21,7 @@ table.allowsMultipleSelection = True
|
||||
removeSelectedButton.width = 142
|
||||
clearButton.width = 142
|
||||
closeButton.width = 84
|
||||
buttonLayout = HLayout(left=[removeSelectedButton, clearButton], right=[closeButton])
|
||||
buttonLayout = HLayout([removeSelectedButton, clearButton, None, closeButton])
|
||||
buttonLayout.packToCorner(Pack.LowerLeft)
|
||||
buttonLayout.fill(Pack.Right)
|
||||
buttonLayout.setAnchor(Pack.Below)
|
||||
|
||||
50
cocoa/base/ui/prioritize_dialog.py
Normal file
50
cocoa/base/ui/prioritize_dialog.py
Normal file
@@ -0,0 +1,50 @@
|
||||
ownerclass = 'PrioritizeDialog'
|
||||
ownerimport = 'PrioritizeDialog.h'
|
||||
|
||||
result = Window(610, 400, "Re-Prioritize duplicates")
|
||||
promptLabel = Label(result, "Add criteria to the right box and click OK to send the dupes that "
|
||||
"correspond the best to these criteria to their respective group's reference position. Read "
|
||||
"the help file for more information.")
|
||||
categoryPopup = Popup(result)
|
||||
criteriaTable = ListView(result)
|
||||
prioritizationTable = ListView(result)
|
||||
addButton = Button(result, "-->")
|
||||
removeButton = Button(result, "<--")
|
||||
okButton = Button(result, "Ok")
|
||||
cancelButton = Button(result, "Cancel")
|
||||
|
||||
owner.categoryPopUpView = categoryPopup
|
||||
owner.criteriaTableView = criteriaTable
|
||||
owner.prioritizationTableView = prioritizationTable
|
||||
|
||||
result.canMinimize = False
|
||||
result.canClose = False
|
||||
result.minSize = Size(result.width, result.height)
|
||||
addButton.action = Action(owner.model, 'addSelected')
|
||||
removeButton.action = Action(owner.model, 'removeSelected')
|
||||
okButton.action = Action(owner, 'ok')
|
||||
cancelButton.action = Action(owner, 'cancel')
|
||||
okButton.keyEquivalent = '\\r'
|
||||
cancelButton.keyEquivalent = '\\e'
|
||||
|
||||
promptLabel.height *= 3 # 3 lines
|
||||
|
||||
leftLayout = VLayout([categoryPopup, criteriaTable], width=262, filler=criteriaTable)
|
||||
middleLayout = VLayout([addButton, removeButton], width=41)
|
||||
buttonLayout = HLayout([None, cancelButton, okButton])
|
||||
|
||||
promptLabel.packToCorner(Pack.UpperLeft)
|
||||
promptLabel.fill(Pack.Right)
|
||||
leftLayout.packRelativeTo(promptLabel, Pack.Below)
|
||||
middleLayout.packRelativeTo(leftLayout, Pack.Right, align=Pack.Above)
|
||||
prioritizationTable.packRelativeTo(middleLayout, Pack.Right, align=Pack.Above)
|
||||
buttonLayout.packRelativeTo(leftLayout, Pack.Below)
|
||||
buttonLayout.fill(Pack.Right)
|
||||
leftLayout.fill(Pack.Below)
|
||||
middleLayout.packRelativeTo(leftLayout, Pack.Right, align=Pack.Middle)
|
||||
prioritizationTable.fill(Pack.Below, goal=leftLayout.y)
|
||||
prioritizationTable.fill(Pack.Right)
|
||||
|
||||
promptLabel.setAnchor(Pack.UpperLeft, growX=True)
|
||||
prioritizationTable.setAnchor(Pack.UpperLeft, growX=True, growY=True)
|
||||
buttonLayout.setAnchor(Pack.Below)
|
||||
Reference in New Issue
Block a user