1
0
Форк 0

Un-xibless-ified ProblemDialog

This commit is contained in:
Virgil Dupras 2017-04-04 21:45:59 -04:00
джерело e3cd9e113b
коміт 171c9cefed
5 змінених файлів з 147 додано та 47 видалено

@ -0,0 +1,94 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="12118" systemVersion="16E195" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="12118"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="ProblemDialog">
<connections>
<outlet property="problemTableView" destination="8" id="26"/>
<outlet property="window" destination="1" id="22"/>
</connections>
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application"/>
<window title="Problems!" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="1">
<windowStyleMask key="styleMask" titled="YES" closable="YES" resizable="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="477" y="306" width="480" height="309"/>
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1058"/>
<view key="contentView" id="2">
<rect key="frame" x="0.0" y="0.0" width="480" height="309"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="NO" id="3">
<rect key="frame" x="17" y="238" width="446" height="51"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" controlSize="mini" sendsActionOnEndEditing="YES" id="4">
<font key="font" metaFont="system"/>
<string key="title">There were problems processing some (or all) of the files. The cause of these problems are described in the table below. Those files were not removed from your results.</string>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<scrollView autohidesScrollers="YES" horizontalLineScroll="19" horizontalPageScroll="10" verticalLineScroll="19" verticalPageScroll="10" usesPredominantAxisScrolling="NO" id="5">
<rect key="frame" x="20" y="60" width="440" height="170"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<clipView key="contentView" id="43w-Qs-l3Z">
<rect key="frame" x="1" y="0.0" width="438" height="169"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnSelection="YES" multipleSelection="NO" autosaveColumns="NO" headerView="9" id="8">
<rect key="frame" x="0.0" y="0.0" width="438" height="146"/>
<autoresizingMask key="autoresizingMask"/>
<size key="intercellSpacing" width="3" height="2"/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
<color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
</tableView>
</subviews>
</clipView>
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="YES" id="7">
<rect key="frame" x="1" y="154" width="438" height="15"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="NO" id="6">
<rect key="frame" x="224" y="17" width="15" height="102"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<tableHeaderView key="headerView" id="9">
<rect key="frame" x="0.0" y="0.0" width="438" height="23"/>
<autoresizingMask key="autoresizingMask"/>
</tableHeaderView>
</scrollView>
<button verticalHuggingPriority="750" imageHugsTitle="YES" id="18">
<rect key="frame" x="356" y="12" width="110" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
<buttonCell key="cell" type="push" title="Close" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="19">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
<string key="keyEquivalent" base64-UTF8="YES">
DQ
</string>
</buttonCell>
<connections>
<action selector="performClose:" target="1" id="25"/>
</connections>
</button>
<button verticalHuggingPriority="750" imageHugsTitle="YES" id="20">
<rect key="frame" x="14" y="12" width="162" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<buttonCell key="cell" type="push" title="Reveal Selected" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="21">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<action selector="revealSelected:" target="-2" id="24"/>
</connections>
</button>
</subviews>
</view>
</window>
</objects>
</document>

@ -1,5 +1,5 @@
/*
Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
Copyright 2017 Virgil Dupras
This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
which should be included with this package. The terms are also available at
@ -14,7 +14,7 @@ http://www.gnu.org/licenses/gpl-3.0.html
{
PyProblemDialog *model;
HSTable *problemTable;
NSTableView *problemTableView;
IBOutlet NSTableView *problemTableView;
}
@property (readwrite, retain) PyProblemDialog *model;
@ -23,4 +23,5 @@ http://www.gnu.org/licenses/gpl-3.0.html
- (id)initWithPyRef:(PyObject *)aPyRef;
- (void)initializeColumns;
- (IBAction)revealSelected:(id)sender;
@end

@ -1,5 +1,5 @@
/*
Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
Copyright 2017 Virgil Dupras
This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
which should be included with this package. The terms are also available at
@ -7,7 +7,6 @@ http://www.gnu.org/licenses/gpl-3.0.html
*/
#import "ProblemDialog.h"
#import "ProblemDialog_UI.h"
#import "Utils.h"
@implementation ProblemDialog
@ -17,9 +16,9 @@ http://www.gnu.org/licenses/gpl-3.0.html
- (id)initWithPyRef:(PyObject *)aPyRef
{
self = [super initWithWindow:nil];
self = [super initWithWindowNibName:@"ProblemDialog"];
[self window];
self.model = [[PyProblemDialog alloc] initWithModel:aPyRef];
[self setWindow:createProblemDialog_UI(self)];
problemTable = [[HSTable alloc] initWithPyRef:[self.model problemTable] tableView:problemTableView];
[self initializeColumns];
return self;
@ -41,4 +40,9 @@ http://www.gnu.org/licenses/gpl-3.0.html
[[problemTable columns] initializeColumns:defs];
[[problemTable columns] setColumnsAsReadOnly];
}
- (IBAction)revealSelected:(id)sender
{
[model revealSelected];
}
@end

@ -1,35 +0,0 @@
ownerclass = 'ProblemDialog'
ownerimport = 'ProblemDialog.h'
result = Window(480, 310, "Problems!")
messageLabel = Label(result, "There were problems processing some (or all) of the files. The cause "
"of these problems are described in the table below. Those files were not removed from your "
"results.")
problemTable = TableView(result)
revealButton = Button(result, "Reveal")
closeButton = Button(result, "Close")
owner.problemTableView = problemTable
result.canMinimize = False
result.minSize = Size(300, 300)
closeButton.keyEquivalent = '\\r'
revealButton.action = Action(owner.model, 'revealSelected')
closeButton.action = Action(result, 'performClose:')
messageLabel.height *= 3 # 3 lines
revealButton.width = 150
closeButton.width = 98
messageLabel.packToCorner(Pack.UpperLeft)
messageLabel.fill(Pack.Right)
problemTable.packRelativeTo(messageLabel, Pack.Below)
problemTable.fill(Pack.Right)
revealButton.packRelativeTo(problemTable, Pack.Below)
closeButton.packRelativeTo(problemTable, Pack.Below, align=Pack.Right)
problemTable.fill(Pack.Below)
messageLabel.setAnchor(Pack.UpperLeft, growX=True)
problemTable.setAnchor(Pack.UpperLeft, growX=True, growY=True)
revealButton.setAnchor(Pack.LowerLeft)
closeButton.setAnchor(Pack.LowerRight)

@ -58,7 +58,6 @@
CE9721461E74E41D00A598C9 /* PreferencesPanelMusic_UI.m in Sources */ = {isa = PBXBuildFile; fileRef = CE97210A1E74E41C00A598C9 /* PreferencesPanelMusic_UI.m */; };
CE9721471E74E41D00A598C9 /* PreferencesPanelPicture_UI.m in Sources */ = {isa = PBXBuildFile; fileRef = CE97210C1E74E41C00A598C9 /* PreferencesPanelPicture_UI.m */; };
CE9721481E74E41D00A598C9 /* PreferencesPanelStandard_UI.m in Sources */ = {isa = PBXBuildFile; fileRef = CE97210E1E74E41C00A598C9 /* PreferencesPanelStandard_UI.m */; };
CE97214A1E74E41D00A598C9 /* ProblemDialog_UI.m in Sources */ = {isa = PBXBuildFile; fileRef = CE9721121E74E41D00A598C9 /* ProblemDialog_UI.m */; };
CE97214C1E74E41D00A598C9 /* PyBaseApp.m in Sources */ = {isa = PBXBuildFile; fileRef = CE9721161E74E41D00A598C9 /* PyBaseApp.m */; };
CE97214D1E74E41D00A598C9 /* PyColumns.m in Sources */ = {isa = PBXBuildFile; fileRef = CE9721181E74E41D00A598C9 /* PyColumns.m */; };
CE97214E1E74E41D00A598C9 /* PyDeletionOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = CE97211A1E74E41D00A598C9 /* PyDeletionOptions.m */; };
@ -84,6 +83,7 @@
CEF093FF1E94795600CD0BF3 /* DetailsPanel.xib in Resources */ = {isa = PBXBuildFile; fileRef = CEF093FD1E94795600CD0BF3 /* DetailsPanel.xib */; };
CEF094201E947AF700CD0BF3 /* DetailsPanelPicture.xib in Resources */ = {isa = PBXBuildFile; fileRef = CEF0941E1E947AF700CD0BF3 /* DetailsPanelPicture.xib */; };
CEF094411E947CAB00CD0BF3 /* PrioritizeDialog.xib in Resources */ = {isa = PBXBuildFile; fileRef = CEF0943F1E947CAB00CD0BF3 /* PrioritizeDialog.xib */; };
CEF094621E94828600CD0BF3 /* ProblemDialog.xib in Resources */ = {isa = PBXBuildFile; fileRef = CEF094601E94828600CD0BF3 /* ProblemDialog.xib */; };
CEFC8A251E74F23000965F37 /* dg_cocoa.py in Resources */ = {isa = PBXBuildFile; fileRef = CEFC8A231E74F23000965F37 /* dg_cocoa.py */; };
CEFC8A261E74F23000965F37 /* dupeguru.icns in Resources */ = {isa = PBXBuildFile; fileRef = CEFC8A241E74F23000965F37 /* dupeguru.icns */; };
CEFC8A281E74F28100965F37 /* help in Resources */ = {isa = PBXBuildFile; fileRef = CEFC8A271E74F28100965F37 /* help */; };
@ -305,8 +305,6 @@
CE97210C1E74E41C00A598C9 /* PreferencesPanelPicture_UI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PreferencesPanelPicture_UI.m; path = cocoa/autogen/PreferencesPanelPicture_UI.m; sourceTree = "<group>"; };
CE97210D1E74E41C00A598C9 /* PreferencesPanelStandard_UI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PreferencesPanelStandard_UI.h; path = cocoa/autogen/PreferencesPanelStandard_UI.h; sourceTree = "<group>"; };
CE97210E1E74E41C00A598C9 /* PreferencesPanelStandard_UI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PreferencesPanelStandard_UI.m; path = cocoa/autogen/PreferencesPanelStandard_UI.m; sourceTree = "<group>"; };
CE9721111E74E41D00A598C9 /* ProblemDialog_UI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ProblemDialog_UI.h; path = cocoa/autogen/ProblemDialog_UI.h; sourceTree = "<group>"; };
CE9721121E74E41D00A598C9 /* ProblemDialog_UI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ProblemDialog_UI.m; path = cocoa/autogen/ProblemDialog_UI.m; sourceTree = "<group>"; };
CE9721151E74E41D00A598C9 /* PyBaseApp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PyBaseApp.h; path = cocoa/autogen/PyBaseApp.h; sourceTree = "<group>"; };
CE9721161E74E41D00A598C9 /* PyBaseApp.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PyBaseApp.m; path = cocoa/autogen/PyBaseApp.m; sourceTree = "<group>"; };
CE9721171E74E41D00A598C9 /* PyColumns.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PyColumns.h; path = cocoa/autogen/PyColumns.h; sourceTree = "<group>"; };
@ -427,6 +425,22 @@
CEF0945B1E947CFB00CD0BF3 /* uk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = uk; path = cocoa/uk.lproj/PrioritizeDialog.strings; sourceTree = "<group>"; };
CEF0945D1E947CFD00CD0BF3 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "cocoa/zh-Hans.lproj/PrioritizeDialog.strings"; sourceTree = "<group>"; };
CEF0945F1E947CFE00CD0BF3 /* vi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = vi; path = cocoa/vi.lproj/PrioritizeDialog.strings; sourceTree = "<group>"; };
CEF094611E94828600CD0BF3 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = cocoa/Base.lproj/ProblemDialog.xib; sourceTree = "<group>"; };
CEF094641E94829800CD0BF3 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = cocoa/fr.lproj/ProblemDialog.strings; sourceTree = "<group>"; };
CEF094661E94829900CD0BF3 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = cocoa/de.lproj/ProblemDialog.strings; sourceTree = "<group>"; };
CEF094681E94829C00CD0BF3 /* cs */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = cs; path = cocoa/cs.lproj/ProblemDialog.strings; sourceTree = "<group>"; };
CEF0946A1E94829E00CD0BF3 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = cocoa/es.lproj/ProblemDialog.strings; sourceTree = "<group>"; };
CEF0946C1E9482A000CD0BF3 /* el */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = el; path = cocoa/el.lproj/ProblemDialog.strings; sourceTree = "<group>"; };
CEF0946E1E9482A100CD0BF3 /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = cocoa/it.lproj/ProblemDialog.strings; sourceTree = "<group>"; };
CEF094701E9482A200CD0BF3 /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = cocoa/nl.lproj/ProblemDialog.strings; sourceTree = "<group>"; };
CEF094721E9482A300CD0BF3 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = cocoa/pl.lproj/ProblemDialog.strings; sourceTree = "<group>"; };
CEF094741E9482A400CD0BF3 /* ko */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ko; path = cocoa/ko.lproj/ProblemDialog.strings; sourceTree = "<group>"; };
CEF094761E9482A600CD0BF3 /* hy */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hy; path = cocoa/hy.lproj/ProblemDialog.strings; sourceTree = "<group>"; };
CEF094781E9482A700CD0BF3 /* pt-BR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pt-BR"; path = "cocoa/pt-BR.lproj/ProblemDialog.strings"; sourceTree = "<group>"; };
CEF0947A1E9482A800CD0BF3 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = cocoa/ru.lproj/ProblemDialog.strings; sourceTree = "<group>"; };
CEF0947C1E9482AA00CD0BF3 /* uk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = uk; path = cocoa/uk.lproj/ProblemDialog.strings; sourceTree = "<group>"; };
CEF0947E1E9482AB00CD0BF3 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "cocoa/zh-Hans.lproj/ProblemDialog.strings"; sourceTree = "<group>"; };
CEF094801E9482AC00CD0BF3 /* vi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = vi; path = cocoa/vi.lproj/ProblemDialog.strings; sourceTree = "<group>"; };
CEFC8A231E74F23000965F37 /* dg_cocoa.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; name = dg_cocoa.py; path = cocoa/dg_cocoa.py; sourceTree = "<group>"; };
CEFC8A241E74F23000965F37 /* dupeguru.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = dupeguru.icns; path = cocoa/dupeguru.icns; sourceTree = "<group>"; };
CEFC8A271E74F28100965F37 /* help */ = {isa = PBXFileReference; lastKnownFileType = folder; name = help; path = build/help; sourceTree = "<group>"; };
@ -454,6 +468,7 @@
CEF093FD1E94795600CD0BF3 /* DetailsPanel.xib */,
CEF0941E1E947AF700CD0BF3 /* DetailsPanelPicture.xib */,
CEF0943F1E947CAB00CD0BF3 /* PrioritizeDialog.xib */,
CEF094601E94828600CD0BF3 /* ProblemDialog.xib */,
);
name = xib;
sourceTree = "<group>";
@ -597,8 +612,6 @@
CE97210C1E74E41C00A598C9 /* PreferencesPanelPicture_UI.m */,
CE97210D1E74E41C00A598C9 /* PreferencesPanelStandard_UI.h */,
CE97210E1E74E41C00A598C9 /* PreferencesPanelStandard_UI.m */,
CE9721111E74E41D00A598C9 /* ProblemDialog_UI.h */,
CE9721121E74E41D00A598C9 /* ProblemDialog_UI.m */,
CE9721151E74E41D00A598C9 /* PyBaseApp.h */,
CE9721161E74E41D00A598C9 /* PyBaseApp.m */,
CE9721171E74E41D00A598C9 /* PyColumns.h */,
@ -760,6 +773,7 @@
CE7CA6061E76337700874874 /* about.xib in Resources */,
CE7CA6071E76337700874874 /* cocoalib.strings in Resources */,
CE0559871E762105008EB4F8 /* IgnoreListDialog.xib in Resources */,
CEF094621E94828600CD0BF3 /* ProblemDialog.xib in Resources */,
CEF094201E947AF700CD0BF3 /* DetailsPanelPicture.xib in Resources */,
CEFC8A261E74F23000965F37 /* dupeguru.icns in Resources */,
CE65D0CC1E7781640092126E /* progress.xib in Resources */,
@ -833,7 +847,6 @@
CE6F7E171E74EA26004C0518 /* NSTableViewAdditions.m in Sources */,
CE9721471E74E41D00A598C9 /* PreferencesPanelPicture_UI.m in Sources */,
CE97215C1E74E41D00A598C9 /* PyTable.m in Sources */,
CE97214A1E74E41D00A598C9 /* ProblemDialog_UI.m in Sources */,
CE9721581E74E41D00A598C9 /* PyProgressWindow.m in Sources */,
CE6F7DEC1E74E9E4004C0518 /* NSEventAdditions.m in Sources */,
CE6F7E161E74EA26004C0518 /* NSIndexPathAdditions.m in Sources */,
@ -1120,6 +1133,29 @@
name = PrioritizeDialog.xib;
sourceTree = "<group>";
};
CEF094601E94828600CD0BF3 /* ProblemDialog.xib */ = {
isa = PBXVariantGroup;
children = (
CEF094611E94828600CD0BF3 /* Base */,
CEF094641E94829800CD0BF3 /* fr */,
CEF094661E94829900CD0BF3 /* de */,
CEF094681E94829C00CD0BF3 /* cs */,
CEF0946A1E94829E00CD0BF3 /* es */,
CEF0946C1E9482A000CD0BF3 /* el */,
CEF0946E1E9482A100CD0BF3 /* it */,
CEF094701E9482A200CD0BF3 /* nl */,
CEF094721E9482A300CD0BF3 /* pl */,
CEF094741E9482A400CD0BF3 /* ko */,
CEF094761E9482A600CD0BF3 /* hy */,
CEF094781E9482A700CD0BF3 /* pt-BR */,
CEF0947A1E9482A800CD0BF3 /* ru */,
CEF0947C1E9482AA00CD0BF3 /* uk */,
CEF0947E1E9482AB00CD0BF3 /* zh-Hans */,
CEF094801E9482AC00CD0BF3 /* vi */,
);
name = ProblemDialog.xib;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */