Skip to content

Commit 9f4de9e

Browse files
Added info labels for both functinalities.
1 parent 2a4cb70 commit 9f4de9e

File tree

3 files changed

+47
-18
lines changed

3 files changed

+47
-18
lines changed

mac Organizer/Base.lproj/Main.storyboard

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,7 @@
734734
<autoresizingMask key="autoresizingMask"/>
735735
<subviews>
736736
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="A0V-a4-7uc">
737-
<rect key="frame" x="314" y="122" width="122" height="32"/>
737+
<rect key="frame" x="314" y="112" width="122" height="32"/>
738738
<constraints>
739739
<constraint firstAttribute="width" constant="110" id="Obd-ms-OjU"/>
740740
</constraints>
@@ -747,7 +747,7 @@
747747
</connections>
748748
</button>
749749
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="WKp-sU-fFW">
750-
<rect key="frame" x="20" y="128" width="290" height="22"/>
750+
<rect key="frame" x="20" y="118" width="290" height="22"/>
751751
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" borderStyle="bezel" alignment="center" placeholderString="Choose a Folder" bezelStyle="round" id="reZ-Jw-MxN">
752752
<font key="font" metaFont="system"/>
753753
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@@ -764,27 +764,30 @@
764764
<action selector="organizeButtonPressed:" target="Z8c-NA-AlE" id="So9-BM-CIt"/>
765765
</connections>
766766
</button>
767-
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="9T0-2j-TJ7">
768-
<rect key="frame" x="18" y="182" width="414" height="17"/>
769-
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
770-
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" title="Label" id="3le-nU-XGJ">
771-
<font key="font" metaFont="system" size="11"/>
767+
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="9T0-2j-TJ7">
768+
<rect key="frame" x="18" y="186" width="414" height="14"/>
769+
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="justified" title="Label" id="3le-nU-XGJ">
770+
<font key="font" metaFont="smallSystem"/>
772771
<color key="textColor" name="disabledControlTextColor" catalog="System" colorSpace="catalog"/>
773772
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
774773
</textFieldCell>
775774
</textField>
776775
</subviews>
777776
<constraints>
778777
<constraint firstItem="A0V-a4-7uc" firstAttribute="leading" secondItem="WKp-sU-fFW" secondAttribute="trailing" constant="10" id="1RR-E6-yPZ"/>
779-
<constraint firstItem="tE2-az-7Bi" firstAttribute="top" secondItem="WKp-sU-fFW" secondAttribute="bottom" constant="50" id="DUj-7h-p0h"/>
778+
<constraint firstAttribute="trailing" secondItem="9T0-2j-TJ7" secondAttribute="trailing" constant="20" id="BFP-6U-1U1"/>
779+
<constraint firstItem="tE2-az-7Bi" firstAttribute="top" secondItem="WKp-sU-fFW" secondAttribute="bottom" constant="40" id="DUj-7h-p0h"/>
780780
<constraint firstAttribute="trailing" secondItem="A0V-a4-7uc" secondAttribute="trailing" constant="20" id="GgH-AJ-fbF"/>
781781
<constraint firstItem="tE2-az-7Bi" firstAttribute="centerX" secondItem="pkQ-S3-gbg" secondAttribute="centerX" id="QbS-wj-YrM"/>
782+
<constraint firstItem="9T0-2j-TJ7" firstAttribute="leading" secondItem="pkQ-S3-gbg" secondAttribute="leading" constant="20" id="Wrz-er-H33"/>
783+
<constraint firstItem="9T0-2j-TJ7" firstAttribute="top" secondItem="pkQ-S3-gbg" secondAttribute="top" constant="50" id="qJA-wr-sEZ"/>
782784
<constraint firstItem="WKp-sU-fFW" firstAttribute="leading" secondItem="pkQ-S3-gbg" secondAttribute="leading" constant="20" id="tNL-a4-v2k"/>
783-
<constraint firstItem="WKp-sU-fFW" firstAttribute="top" secondItem="pkQ-S3-gbg" secondAttribute="top" constant="100" id="ugg-z0-5DE"/>
784-
<constraint firstItem="A0V-a4-7uc" firstAttribute="top" secondItem="pkQ-S3-gbg" secondAttribute="top" constant="100" id="yvp-cI-6ok"/>
785+
<constraint firstItem="WKp-sU-fFW" firstAttribute="top" secondItem="pkQ-S3-gbg" secondAttribute="top" constant="110" id="ugg-z0-5DE"/>
786+
<constraint firstItem="A0V-a4-7uc" firstAttribute="top" secondItem="pkQ-S3-gbg" secondAttribute="top" constant="110" id="yvp-cI-6ok"/>
785787
</constraints>
786788
</view>
787789
<connections>
790+
<outlet property="InfoLabel" destination="9T0-2j-TJ7" id="TA0-7P-AGW"/>
788791
<outlet property="folderPickedLabel" destination="WKp-sU-fFW" id="cJU-ZA-EA5"/>
789792
</connections>
790793
</viewController>
@@ -801,7 +804,7 @@
801804
<autoresizingMask key="autoresizingMask"/>
802805
<subviews>
803806
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ZrZ-40-eKt">
804-
<rect key="frame" x="314" y="172" width="122" height="32"/>
807+
<rect key="frame" x="314" y="162" width="122" height="32"/>
805808
<constraints>
806809
<constraint firstAttribute="width" constant="110" id="k43-w2-xTg"/>
807810
</constraints>
@@ -814,11 +817,11 @@
814817
</connections>
815818
</button>
816819
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Xfh-Rd-PL8">
817-
<rect key="frame" x="20" y="178" width="290" height="22"/>
820+
<rect key="frame" x="20" y="168" width="290" height="22"/>
818821
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" borderStyle="bezel" alignment="center" placeholderString="Choose a Folder" bezelStyle="round" id="PYx-lq-r4m">
819822
<font key="font" metaFont="system"/>
820823
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
821-
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
824+
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
822825
</textFieldCell>
823826
</textField>
824827
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="igf-lL-h9r">
@@ -831,19 +834,31 @@
831834
<action selector="deleteButtonPressed:" target="j0Z-IW-wkR" id="NsQ-Up-KSn"/>
832835
</connections>
833836
</button>
837+
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Pwo-GQ-5gC">
838+
<rect key="frame" x="18" y="236" width="414" height="14"/>
839+
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="justified" title="Label" id="NpO-TT-OV5">
840+
<font key="font" metaFont="smallSystem"/>
841+
<color key="textColor" name="disabledControlTextColor" catalog="System" colorSpace="catalog"/>
842+
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
843+
</textFieldCell>
844+
</textField>
834845
</subviews>
835846
<constraints>
836-
<constraint firstItem="igf-lL-h9r" firstAttribute="top" secondItem="Xfh-Rd-PL8" secondAttribute="bottom" constant="50" id="Bl5-CY-Ace"/>
847+
<constraint firstItem="igf-lL-h9r" firstAttribute="top" secondItem="Xfh-Rd-PL8" secondAttribute="bottom" constant="40" id="Bl5-CY-Ace"/>
837848
<constraint firstAttribute="trailing" secondItem="ZrZ-40-eKt" secondAttribute="trailing" constant="20" id="ESR-jw-xag"/>
838849
<constraint firstItem="Xfh-Rd-PL8" firstAttribute="leading" secondItem="sq1-Ar-NQb" secondAttribute="leading" constant="20" id="IDM-uJ-dKf"/>
839850
<constraint firstItem="ZrZ-40-eKt" firstAttribute="leading" secondItem="Xfh-Rd-PL8" secondAttribute="trailing" constant="10" id="RN7-nY-181"/>
851+
<constraint firstItem="Pwo-GQ-5gC" firstAttribute="leading" secondItem="sq1-Ar-NQb" secondAttribute="leading" constant="20" id="TUm-KX-WJw"/>
840852
<constraint firstItem="igf-lL-h9r" firstAttribute="centerX" secondItem="sq1-Ar-NQb" secondAttribute="centerX" id="ecX-3H-8OS"/>
841-
<constraint firstItem="ZrZ-40-eKt" firstAttribute="top" secondItem="sq1-Ar-NQb" secondAttribute="top" constant="100" id="g5S-kk-Dsh"/>
842-
<constraint firstItem="Xfh-Rd-PL8" firstAttribute="top" secondItem="sq1-Ar-NQb" secondAttribute="top" constant="100" id="vJW-cQ-4Ag"/>
853+
<constraint firstItem="ZrZ-40-eKt" firstAttribute="top" secondItem="sq1-Ar-NQb" secondAttribute="top" constant="110" id="g5S-kk-Dsh"/>
854+
<constraint firstAttribute="trailing" secondItem="Pwo-GQ-5gC" secondAttribute="trailing" constant="20" id="kzY-ny-lL5"/>
855+
<constraint firstItem="Pwo-GQ-5gC" firstAttribute="top" secondItem="sq1-Ar-NQb" secondAttribute="top" constant="50" id="lfk-G8-XPf"/>
856+
<constraint firstItem="Xfh-Rd-PL8" firstAttribute="top" secondItem="sq1-Ar-NQb" secondAttribute="top" constant="110" id="vJW-cQ-4Ag"/>
843857
</constraints>
844858
</view>
845859
<connections>
846860
<outlet property="folderPickedLabel" destination="Xfh-Rd-PL8" id="APQ-6T-gex"/>
861+
<outlet property="infoLabel" destination="Pwo-GQ-5gC" id="nMg-x6-tHf"/>
847862
</connections>
848863
</viewController>
849864
<customObject id="PBx-on-ADr" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>

mac Organizer/DeleteDuplicatesViewController.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,19 @@ class DeleteDuplicatesViewController: NSViewController {
1616

1717
@IBOutlet weak var folderPickedLabel: NSTextField!
1818

19+
@IBOutlet weak var infoLabel: NSTextField!
20+
1921
var folderPicked = ""
2022

23+
let info = "Func: Deletes duplicate files and archives from the chosen folder. Moves them to trash where they can be reviewed by you before being deleted permanently."
24+
2125
override func viewDidLoad() {
2226
super.viewDidLoad()
27+
infoLabel.stringValue = info
28+
infoLabel.usesSingleLineMode = false
29+
infoLabel.cell?.wraps = true
2330
NSLayoutConstraint.activate([
24-
self.view.widthAnchor.constraint(equalToConstant: 450),
31+
self.view.widthAnchor.constraint(equalToConstant: 500),
2532
self.view.heightAnchor.constraint(equalToConstant: 300)
2633
])
2734
}

mac Organizer/OrganizeViewController.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,19 @@ class OrganizeViewController: NSViewController, FileManagerDelegate {
1818

1919
@IBOutlet var folderPickedLabel: NSTextField!
2020

21+
@IBOutlet weak var InfoLabel: NSTextField!
22+
2123
var folderPicked = ""
2224

25+
let info = "Func: Organizes files in the chosen folder according to the file type. Creates a new folder 'organized' and move unorganized files there in respective filetype folders."
26+
2327
override func viewDidLoad() {
2428
super.viewDidLoad()
29+
InfoLabel.stringValue = info
30+
InfoLabel.usesSingleLineMode = false
31+
InfoLabel.cell?.wraps = true
2532
NSLayoutConstraint.activate([
26-
self.view.widthAnchor.constraint(equalToConstant: 450),
33+
self.view.widthAnchor.constraint(equalToConstant: 500),
2734
self.view.heightAnchor.constraint(equalToConstant: 300)
2835
])
2936
}

0 commit comments

Comments
 (0)