contact request: add list of blocked contacts.
In preferences add new tab for banned contact. The list contain
contact's bestID and button to perform unban.
Change-Id: I376f63420ec0573e47574a79923c798b50148a31
Reviewed-by: Anthony LĂ©onard <anthony.leonard@savoirfairelinux.com>
diff --git a/ui/Base.lproj/AccBannedContacts.xib b/ui/Base.lproj/AccBannedContacts.xib
new file mode 100644
index 0000000..ef04687
--- /dev/null
+++ b/ui/Base.lproj/AccBannedContacts.xib
@@ -0,0 +1,179 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11762" systemVersion="16D30a" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+ <dependencies>
+ <deployment identifier="macosx"/>
+ <development version="7000" identifier="xcode"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11762"/>
+ </dependencies>
+ <objects>
+ <customObject id="-2" userLabel="File's Owner" customClass="AccBannedContactsVC">
+ <connections>
+ <outlet property="banedContactsView" destination="Jww-D6-G6c" id="t2b-ru-Iya"/>
+ <outlet property="view" destination="Hz6-mo-xeY" id="0bl-1N-x8E"/>
+ </connections>
+ </customObject>
+ <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
+ <customObject id="-3" userLabel="Application" customClass="NSObject"/>
+ <customView id="Hz6-mo-xeY">
+ <rect key="frame" x="0.0" y="0.0" width="576" height="409"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+ <subviews>
+ <scrollView borderType="none" autohidesScrollers="YES" horizontalLineScroll="57" horizontalPageScroll="10" verticalLineScroll="57" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yfP-bc-Xgm">
+ <rect key="frame" x="20" y="68" width="536" height="273"/>
+ <clipView key="contentView" id="3TS-qm-PVP">
+ <rect key="frame" x="0.0" y="0.0" width="536" height="273"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+ <subviews>
+ <outlineView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" autosaveColumns="NO" rowHeight="55" rowSizeStyle="automatic" viewBased="YES" outlineTableColumn="q9O-v7-HAE" id="Jww-D6-G6c" customClass="RingOutlineView">
+ <rect key="frame" x="1" y="0.0" width="536" height="273"/>
+ <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"/>
+ <tableColumns>
+ <tableColumn width="533" minWidth="40" maxWidth="1000" id="q9O-v7-HAE">
+ <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border">
+ <font key="font" metaFont="smallSystem"/>
+ <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
+ <color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
+ </tableHeaderCell>
+ <textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" id="8ir-wh-VwZ">
+ <font key="font" metaFont="system"/>
+ <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+ <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
+ </textFieldCell>
+ <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
+ <prototypeCellViews>
+ <tableCellView identifier="BannedContactsCellView" id="yvA-Dk-60v">
+ <rect key="frame" x="1" y="1" width="533" height="50"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+ <subviews>
+ <textField verticalHuggingPriority="750" tag="200" translatesAutoresizingMaskIntoConstraints="NO" id="xiu-p3-rS2" userLabel="RingId label">
+ <rect key="frame" x="68" y="5" width="397" height="14"/>
+ <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" placeholderString="ringID" id="KHF-ns-H2e">
+ <font key="font" metaFont="smallSystem"/>
+ <color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
+ <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+ </textFieldCell>
+ </textField>
+ <textField horizontalHuggingPriority="249" verticalHuggingPriority="750" tag="100" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="3J5-Lt-Tbh" userLabel="UserName label">
+ <rect key="frame" x="68" y="26" width="373" height="21"/>
+ <textFieldCell key="cell" sendsActionOnEndEditing="YES" placeholderString="Name" id="j1x-P5-XrV">
+ <font key="font" metaFont="system" size="17"/>
+ <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+ <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+ </textFieldCell>
+ </textField>
+ <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" tag="300" translatesAutoresizingMaskIntoConstraints="NO" id="heK-JU-BLA" userLabel="Photo Image View">
+ <rect key="frame" x="9" y="5" width="40" height="40"/>
+ <constraints>
+ <constraint firstAttribute="width" constant="40" id="ela-ER-W2E"/>
+ <constraint firstAttribute="height" constant="40" id="p1e-7J-S8X"/>
+ </constraints>
+ <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="default_user_icon" id="eol-Dr-Loc"/>
+ </imageView>
+ <box verticalHuggingPriority="750" boxType="separator" translatesAutoresizingMaskIntoConstraints="NO" id="KxZ-YB-Y5R">
+ <rect key="frame" x="10" y="0.0" width="513" height="5"/>
+ </box>
+ <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="HEJ-QY-6vh" userLabel="Unban button">
+ <rect key="frame" x="471" y="15" width="51" height="19"/>
+ <constraints>
+ <constraint firstAttribute="width" constant="51" id="LVA-Tv-6ur"/>
+ <constraint firstAttribute="height" constant="18" id="Mls-WR-tbB"/>
+ </constraints>
+ <buttonCell key="cell" type="roundRect" title="Unban" bezelStyle="roundedRect" alignment="center" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="ycl-gc-tfz">
+ <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+ <font key="font" metaFont="cellTitle"/>
+ </buttonCell>
+ <connections>
+ <action selector="unbanContact:" target="-2" id="DOQ-Oz-vUn"/>
+ </connections>
+ </button>
+ </subviews>
+ <constraints>
+ <constraint firstAttribute="bottom" secondItem="KxZ-YB-Y5R" secondAttribute="bottom" constant="2" id="4S9-bP-a6B"/>
+ <constraint firstItem="3J5-Lt-Tbh" firstAttribute="top" secondItem="yvA-Dk-60v" secondAttribute="top" constant="3" id="5XB-9j-hCn"/>
+ <constraint firstItem="3J5-Lt-Tbh" firstAttribute="leading" secondItem="heK-JU-BLA" secondAttribute="trailing" constant="21" id="5vU-Lv-gXU"/>
+ <constraint firstItem="xiu-p3-rS2" firstAttribute="top" secondItem="3J5-Lt-Tbh" secondAttribute="bottom" constant="7" id="AtP-f8-i2o"/>
+ <constraint firstItem="HEJ-QY-6vh" firstAttribute="leading" secondItem="xiu-p3-rS2" secondAttribute="trailing" constant="8" id="Fkf-Ob-EAJ"/>
+ <constraint firstItem="heK-JU-BLA" firstAttribute="centerY" secondItem="yvA-Dk-60v" secondAttribute="centerY" id="QJZ-wM-Asd"/>
+ <constraint firstItem="HEJ-QY-6vh" firstAttribute="leading" secondItem="3J5-Lt-Tbh" secondAttribute="trailing" constant="32" id="aXa-ci-iJe"/>
+ <constraint firstItem="xiu-p3-rS2" firstAttribute="leading" secondItem="3J5-Lt-Tbh" secondAttribute="leading" id="adb-Ka-lBb"/>
+ <constraint firstItem="HEJ-QY-6vh" firstAttribute="centerY" secondItem="yvA-Dk-60v" secondAttribute="centerY" id="iUf-3b-rxY"/>
+ <constraint firstAttribute="trailing" secondItem="KxZ-YB-Y5R" secondAttribute="trailing" constant="10" id="ria-XU-mMJ"/>
+ <constraint firstAttribute="trailing" secondItem="HEJ-QY-6vh" secondAttribute="trailing" constant="11" id="rr0-jh-yvq"/>
+ <constraint firstItem="heK-JU-BLA" firstAttribute="leading" secondItem="yvA-Dk-60v" secondAttribute="leading" constant="9" id="sjC-op-SVc"/>
+ <constraint firstItem="KxZ-YB-Y5R" firstAttribute="leading" secondItem="yvA-Dk-60v" secondAttribute="leading" constant="10" id="us3-aB-Fb3"/>
+ </constraints>
+ </tableCellView>
+ <customView identifier="HoverRowView" id="4Ke-ca-dot" customClass="HoverTableRowView">
+ <rect key="frame" x="1" y="53" width="533" height="55"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+ </customView>
+ </prototypeCellViews>
+ </tableColumn>
+ </tableColumns>
+ <connections>
+ <outlet property="delegate" destination="-2" id="vJs-Jv-txp"/>
+ </connections>
+ </outlineView>
+ </subviews>
+ </clipView>
+ <scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="X0Z-7Z-yBw">
+ <rect key="frame" x="0.0" y="-16" width="0.0" height="16"/>
+ <autoresizingMask key="autoresizingMask"/>
+ </scroller>
+ <scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="NO" id="KSC-7T-urR">
+ <rect key="frame" x="520" y="0.0" width="16" height="0.0"/>
+ <autoresizingMask key="autoresizingMask"/>
+ </scroller>
+ <connections>
+ <binding destination="-2" name="hidden" keyPath="self.bannedListIsEmpty" id="btT-0K-Nbc"/>
+ </connections>
+ </scrollView>
+ <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="cId-4e-cg5">
+ <rect key="frame" x="18" y="361" width="540" height="34"/>
+ <textFieldCell key="cell" sendsActionOnEndEditing="YES" title="You have been blocked those contacts and now you could not receive message or calls from them." id="ChL-MC-7AO">
+ <font key="font" metaFont="system"/>
+ <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+ <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+ </textFieldCell>
+ <connections>
+ <binding destination="-2" name="hidden" keyPath="self.bannedListIsEmpty" id="PYP-Le-pFF"/>
+ </connections>
+ </textField>
+ <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kJe-aB-0em">
+ <rect key="frame" x="175" y="196" width="227" height="17"/>
+ <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="center" title="Your list of banned contact is empty" id="U37-wU-p5w">
+ <font key="font" metaFont="system"/>
+ <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+ <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+ </textFieldCell>
+ <connections>
+ <binding destination="-2" name="hidden" keyPath="self.bannedListIsEmpty" id="WjW-Tw-7q8">
+ <dictionary key="options">
+ <string key="NSValueTransformerName">NSNegateBoolean</string>
+ </dictionary>
+ </binding>
+ </connections>
+ </textField>
+ </subviews>
+ <constraints>
+ <constraint firstItem="cId-4e-cg5" firstAttribute="trailing" secondItem="yfP-bc-Xgm" secondAttribute="trailing" id="46O-jn-3gw"/>
+ <constraint firstItem="yfP-bc-Xgm" firstAttribute="top" secondItem="cId-4e-cg5" secondAttribute="bottom" constant="20" id="Iyh-qa-2RO"/>
+ <constraint firstItem="cId-4e-cg5" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="20" symbolic="YES" id="XIN-oV-FnM"/>
+ <constraint firstItem="kJe-aB-0em" firstAttribute="centerX" secondItem="Hz6-mo-xeY" secondAttribute="centerX" id="g33-dk-Ckj"/>
+ <constraint firstItem="yfP-bc-Xgm" firstAttribute="centerY" secondItem="Hz6-mo-xeY" secondAttribute="centerY" id="jAW-VB-K5A"/>
+ <constraint firstItem="kJe-aB-0em" firstAttribute="centerY" secondItem="Hz6-mo-xeY" secondAttribute="centerY" id="jjQ-qe-32U"/>
+ <constraint firstItem="cId-4e-cg5" firstAttribute="top" secondItem="Hz6-mo-xeY" secondAttribute="top" constant="14" id="n6u-Tq-KsJ"/>
+ <constraint firstAttribute="trailing" secondItem="cId-4e-cg5" secondAttribute="trailing" constant="20" symbolic="YES" id="rai-Pv-phI"/>
+ <constraint firstItem="cId-4e-cg5" firstAttribute="leading" secondItem="yfP-bc-Xgm" secondAttribute="leading" id="wnb-iX-gsx"/>
+ </constraints>
+ <point key="canvasLocation" x="139" y="168.5"/>
+ </customView>
+ <userDefaultsController representsSharedInstance="YES" id="KCt-Mw-bxf"/>
+ </objects>
+ <resources>
+ <image name="default_user_icon" width="96" height="96"/>
+ </resources>
+</document>