data transfer: select download folder

Add setting to select folder for incoming images.

Change-Id: I2ee21e0b9195e8ebfcaf11e101160b8058d39792
Reviewed-by: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
diff --git a/ui/Base.lproj/GeneralPrefs.xib b/ui/Base.lproj/GeneralPrefs.xib
index 54b163d..6f42766 100644
--- a/ui/Base.lproj/GeneralPrefs.xib
+++ b/ui/Base.lproj/GeneralPrefs.xib
@@ -9,6 +9,7 @@
             <connections>
                 <outlet property="addProfilePhotoImage" destination="3l7-TU-AMG" id="oQC-jN-JV0"/>
                 <outlet property="checkIntervalPopUp" destination="RYP-3d-PCa" id="JNO-GR-CV8"/>
+                <outlet property="downloadFolder" destination="7bY-JW-z0U" id="ylD-Yb-I2N"/>
                 <outlet property="historyChangedLabel" destination="Gyi-ID-Z3v" id="aoO-Fh-UCQ"/>
                 <outlet property="historyStepper" destination="QmA-ZI-ZL5" id="dDV-1G-rZs"/>
                 <outlet property="historySwitch" destination="DgD-2y-4g5" id="GYk-pz-jGT"/>
@@ -24,11 +25,11 @@
         <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
         <customObject id="-3" userLabel="Application" customClass="NSObject"/>
         <customView id="c22-O7-iKe">
-            <rect key="frame" x="0.0" y="0.0" width="502" height="421"/>
+            <rect key="frame" x="0.0" y="0.0" width="502" height="445"/>
             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
             <subviews>
                 <textField toolTip="Profile" horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="MV1-AC-qE7">
-                    <rect key="frame" x="30" y="384" width="79" height="17"/>
+                    <rect key="frame" x="30" y="408" width="79" height="17"/>
                     <constraints>
                         <constraint firstAttribute="width" constant="75" id="Nj8-qG-TRL"/>
                     </constraints>
@@ -39,7 +40,7 @@
                     </textFieldCell>
                 </textField>
                 <textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Mjw-8U-dzO">
-                    <rect key="frame" x="211" y="306" width="197" height="21"/>
+                    <rect key="frame" x="211" y="330" width="197" height="21"/>
                     <constraints>
                         <constraint firstAttribute="width" constant="197" id="pDD-Xk-k4K"/>
                     </constraints>
@@ -53,7 +54,7 @@
                     </connections>
                 </textField>
                 <button translatesAutoresizingMaskIntoConstraints="NO" id="Oth-up-2k2">
-                    <rect key="frame" x="56" y="232" width="423" height="18"/>
+                    <rect key="frame" x="56" y="256" width="423" height="18"/>
                     <constraints>
                         <constraint firstAttribute="width" constant="419" id="upW-bh-eQg"/>
                     </constraints>
@@ -66,7 +67,7 @@
                     </connections>
                 </button>
                 <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="j3T-5j-Fom">
-                    <rect key="frame" x="30" y="256" width="449" height="17"/>
+                    <rect key="frame" x="30" y="280" width="449" height="17"/>
                     <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Behaviours" id="Rzy-Gh-3wQ">
                         <font key="font" metaFont="systemBold"/>
                         <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -74,7 +75,7 @@
                     </textFieldCell>
                 </textField>
                 <button translatesAutoresizingMaskIntoConstraints="NO" id="1Nr-L4-fcd">
-                    <rect key="frame" x="56" y="178" width="423" height="18"/>
+                    <rect key="frame" x="56" y="202" width="423" height="18"/>
                     <constraints>
                         <constraint firstAttribute="width" constant="419" id="8Mk-zb-NLA"/>
                     </constraints>
@@ -86,6 +87,27 @@
                         <action selector="toggleLaunchAtStartup:" target="-2" id="Rky-YK-2yk"/>
                     </connections>
                 </button>
+                <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="7bY-JW-z0U">
+                    <rect key="frame" x="171" y="158" width="82" height="32"/>
+                    <constraints>
+                        <constraint firstAttribute="width" relation="lessThanOrEqual" constant="150" id="d7f-Id-S7d"/>
+                    </constraints>
+                    <buttonCell key="cell" type="push" bezelStyle="rounded" image="ic_folder" imagePosition="left" alignment="center" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="DVe-a5-SU0">
+                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                        <font key="font" metaFont="system"/>
+                    </buttonCell>
+                    <connections>
+                        <action selector="changeDownloadFolder:" target="-2" id="7UI-HT-B4J"/>
+                    </connections>
+                </button>
+                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="IHD-1X-sid">
+                    <rect key="frame" x="56" y="167" width="103" height="17"/>
+                    <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Download folder" id="6Ye-pe-9WV">
+                        <font key="font" metaFont="system"/>
+                        <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                        <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                    </textFieldCell>
+                </textField>
                 <button translatesAutoresizingMaskIntoConstraints="NO" id="DgD-2y-4g5">
                     <rect key="frame" x="56" y="125" width="140" height="18"/>
                     <constraints>
@@ -203,7 +225,7 @@
                     </constraints>
                 </customView>
                 <textField hidden="YES" horizontalHuggingPriority="251" verticalHuggingPriority="750" misplaced="YES" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Gyi-ID-Z3v">
-                    <rect key="frame" x="306" y="126" width="171" height="14"/>
+                    <rect key="frame" x="306" y="150" width="171" height="14"/>
                     <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="center" title="(Applied on application restart)" id="OTl-vx-S43">
                         <font key="font" metaFont="smallSystem"/>
                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@@ -211,14 +233,14 @@
                     </textFieldCell>
                 </textField>
                 <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" textCompletion="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fC0-ce-Yiz">
-                    <rect key="frame" x="18" y="147" width="399" height="17"/>
+                    <rect key="frame" x="18" y="147" width="399" height="0.0"/>
                     <constraints>
                         <constraint firstAttribute="width" constant="395" id="6HO-p7-tAk"/>
                         <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="48" id="JrN-bM-7Wz"/>
                     </constraints>
                 </textField>
                 <button translatesAutoresizingMaskIntoConstraints="NO" id="Is4-pD-LOT">
-                    <rect key="frame" x="56" y="205" width="423" height="18"/>
+                    <rect key="frame" x="56" y="229" width="423" height="18"/>
                     <constraints>
                         <constraint firstAttribute="width" constant="419" id="iUi-lt-J9M"/>
                     </constraints>
@@ -231,7 +253,7 @@
                     </connections>
                 </button>
                 <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="L6I-bx-LnN">
-                    <rect key="frame" x="132" y="281" width="71" height="70"/>
+                    <rect key="frame" x="132" y="305" width="71" height="70"/>
                     <constraints>
                         <constraint firstAttribute="height" constant="70" id="RFb-D4-827"/>
                         <constraint firstAttribute="width" constant="71" id="gAI-0Z-pME"/>
@@ -245,7 +267,7 @@
                     </connections>
                 </button>
                 <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="c9L-Qb-bNK">
-                    <rect key="frame" x="42" y="359" width="482" height="17"/>
+                    <rect key="frame" x="42" y="383" width="482" height="17"/>
                     <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="This is shared with your contacts " id="vbU-2S-O58">
                         <font key="font" metaFont="system"/>
                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@@ -253,7 +275,7 @@
                     </textFieldCell>
                 </textField>
                 <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="3l7-TU-AMG">
-                    <rect key="frame" x="153" y="302" width="30" height="30"/>
+                    <rect key="frame" x="153" y="325" width="30" height="30"/>
                     <constraints>
                         <constraint firstAttribute="height" constant="30" id="3dM-RS-1SR"/>
                         <constraint firstAttribute="width" constant="30" id="San-2A-6Wv"/>
@@ -277,12 +299,15 @@
                 <constraint firstItem="nah-Jm-ZYB" firstAttribute="leading" secondItem="QmA-ZI-ZL5" secondAttribute="trailing" constant="8" id="JJi-0O-nUi"/>
                 <constraint firstItem="tHZ-7Q-5iP" firstAttribute="top" secondItem="QmA-ZI-ZL5" secondAttribute="top" id="Jrk-f0-97K"/>
                 <constraint firstItem="j3T-5j-Fom" firstAttribute="top" secondItem="L6I-bx-LnN" secondAttribute="bottom" constant="8" symbolic="YES" id="OMM-Ry-Zsx"/>
+                <constraint firstItem="7bY-JW-z0U" firstAttribute="leading" secondItem="IHD-1X-sid" secondAttribute="trailing" constant="20" id="Ptz-be-9mW"/>
                 <constraint firstItem="L6I-bx-LnN" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="132" id="QTU-A1-JdM"/>
                 <constraint firstItem="Mjw-8U-dzO" firstAttribute="top" secondItem="c9L-Qb-bNK" secondAttribute="bottom" constant="32" id="TGb-qG-xFk"/>
                 <constraint firstItem="Gyi-ID-Z3v" firstAttribute="centerY" secondItem="nah-Jm-ZYB" secondAttribute="centerY" id="VGH-9C-eD1"/>
+                <constraint firstItem="IHD-1X-sid" firstAttribute="top" secondItem="1Nr-L4-fcd" secondAttribute="bottom" constant="20" id="X4c-Ad-8yh"/>
                 <constraint firstItem="Oth-up-2k2" firstAttribute="top" secondItem="j3T-5j-Fom" secondAttribute="bottom" constant="8" symbolic="YES" id="XMy-vs-rqU"/>
                 <constraint firstItem="QmA-ZI-ZL5" firstAttribute="leading" secondItem="tHZ-7Q-5iP" secondAttribute="trailing" constant="8" id="YPs-UE-IFi"/>
                 <constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="Gyi-ID-Z3v" secondAttribute="trailing" constant="20" id="Z4C-x5-1Op"/>
+                <constraint firstItem="7bY-JW-z0U" firstAttribute="centerY" secondItem="IHD-1X-sid" secondAttribute="centerY" id="aI1-uX-lQY"/>
                 <constraint firstItem="DgD-2y-4g5" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="58" id="aPM-dp-Eym"/>
                 <constraint firstAttribute="bottom" secondItem="yVO-jk-ay3" secondAttribute="bottom" constant="20" id="bAA-rc-QhB"/>
                 <constraint firstItem="3l7-TU-AMG" firstAttribute="centerX" secondItem="L6I-bx-LnN" secondAttribute="centerX" id="bNA-y1-w4O"/>
@@ -291,14 +316,15 @@
                 <constraint firstItem="MV1-AC-qE7" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" constant="20" symbolic="YES" id="eb5-W0-5Yr"/>
                 <constraint firstItem="c9L-Qb-bNK" firstAttribute="top" secondItem="MV1-AC-qE7" secondAttribute="bottom" constant="8" symbolic="YES" id="f2T-ft-Osc"/>
                 <constraint firstItem="DgD-2y-4g5" firstAttribute="leading" secondItem="U84-le-Iy4" secondAttribute="leading" id="ggy-GJ-WMj"/>
+                <constraint firstItem="DgD-2y-4g5" firstAttribute="leading" secondItem="IHD-1X-sid" secondAttribute="leading" id="hIj-5P-1iF"/>
                 <constraint firstItem="Mjw-8U-dzO" firstAttribute="leading" secondItem="L6I-bx-LnN" secondAttribute="trailing" constant="8" symbolic="YES" id="jVt-Fl-fMN"/>
                 <constraint firstItem="Is4-pD-LOT" firstAttribute="top" secondItem="Oth-up-2k2" secondAttribute="bottom" constant="13" id="lHy-u9-IB0"/>
                 <constraint firstItem="L6I-bx-LnN" firstAttribute="centerY" secondItem="Mjw-8U-dzO" secondAttribute="centerY" id="q2I-i3-D74"/>
                 <constraint firstItem="L6I-bx-LnN" firstAttribute="top" secondItem="c9L-Qb-bNK" secondAttribute="bottom" constant="8" symbolic="YES" id="qJk-WJ-ebJ"/>
                 <constraint firstItem="yVO-jk-ay3" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="20" id="qa3-OH-fvn"/>
                 <constraint firstItem="U84-le-Iy4" firstAttribute="top" secondItem="DgD-2y-4g5" secondAttribute="bottom" constant="15" id="szl-Nh-CbR"/>
-                <constraint firstItem="fC0-ce-Yiz" firstAttribute="top" secondItem="1Nr-L4-fcd" secondAttribute="bottom" constant="16" id="tQx-o6-feR"/>
                 <constraint firstItem="MV1-AC-qE7" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="32" id="vN1-5P-m9g"/>
+                <constraint firstItem="fC0-ce-Yiz" firstAttribute="top" secondItem="IHD-1X-sid" secondAttribute="bottom" constant="20" id="vNW-gf-432"/>
                 <constraint firstItem="yVO-jk-ay3" firstAttribute="top" secondItem="U84-le-Iy4" secondAttribute="bottom" constant="13" id="wfT-QL-241"/>
                 <constraint firstAttribute="trailing" secondItem="yVO-jk-ay3" secondAttribute="trailing" constant="20" id="wig-B4-OtV"/>
                 <constraint firstItem="tHZ-7Q-5iP" firstAttribute="top" secondItem="fC0-ce-Yiz" secondAttribute="bottom" constant="2" id="wo5-OT-LTj"/>
@@ -309,6 +335,7 @@
         <customObject id="VEJ-ic-3Ub" customClass="SUUpdater"/>
     </objects>
     <resources>
+        <image name="ic_folder" width="36" height="36"/>
         <image name="ic_picture" width="72" height="72"/>
     </resources>
 </document>