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/CMakeLists.txt b/CMakeLists.txt
index 5d09d2a..d3d77c2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -166,6 +166,8 @@
    src/ContactRequestVC.mm
    src/SendContactRequestWC.h
    src/SendContactRequestWC.mm
+   src/AccBannedContactsVC.h
+   src/AccBannedContactsVC.mm
 )
 
 SET(ringclient_BACKENDS
@@ -249,6 +251,7 @@
    ContactRequestList
    ContactRequest
    SendContactRequest
+   AccBannedContacts
 )
 
 # Icons
diff --git a/src/AccBannedContactsVC.h b/src/AccBannedContactsVC.h
new file mode 100644
index 0000000..5a646fc
--- /dev/null
+++ b/src/AccBannedContactsVC.h
@@ -0,0 +1,26 @@
+/*
+ *  Copyright (C) 2015-2017 Savoir-faire Linux Inc.
+ *  Author: Kateryna Kostiuk <kateryna.kostiuk@savoirfairelinux.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA.
+ */
+
+#import <Cocoa/Cocoa.h>
+
+@interface AccBannedContactsVC : NSViewController
+
+@property (nonatomic) BOOL bannedListIsEmpty;
+
+@end
diff --git a/src/AccBannedContactsVC.mm b/src/AccBannedContactsVC.mm
new file mode 100644
index 0000000..94e51b3
--- /dev/null
+++ b/src/AccBannedContactsVC.mm
@@ -0,0 +1,124 @@
+/*
+ *  Copyright (C) 2015-2017 Savoir-faire Linux Inc.
+ *  Author: Kateryna Kostiuk <kateryna.kostiuk@savoirfairelinux.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA.
+ */
+
+//Qt
+#import <QItemSelectionModel>
+
+//LRC
+#import <account.h>
+#import <availableAccountModel.h>
+#import <contactmethod.h>
+#import <bannedContactmodel.h>
+
+#import "AccBannedContactsVC.h"
+#import "QNSTreeController.h"
+
+@interface AccBannedContactsVC ()
+
+@property QNSTreeController* bannedContactsTreeController;
+@property (unsafe_unretained) IBOutlet NSOutlineView* banedContactsView;
+
+@end
+
+@implementation AccBannedContactsVC
+
+@synthesize bannedContactsTreeController;
+@synthesize banedContactsView;
+
+NSInteger const TAG_NAME        =   100;
+NSInteger const TAG_RINGID      =   200;
+
+- (void)awakeFromNib
+{
+    QObject::connect(AccountModel::instance().selectionModel(),
+                     &QItemSelectionModel::currentChanged,
+                     [=](const QModelIndex &current, const QModelIndex &previous) {
+                         if(!current.isValid())
+                             return;
+                         [self loadAccount];
+                     });
+}
+
+- (void)loadAccount
+{
+    auto account = AccountModel::instance().selectedAccount();
+    self.bannedContactsTreeController = [[QNSTreeController alloc] initWithQModel:(QAbstractItemModel*)account->bannedContactModel()];
+    [self.bannedContactsTreeController setAvoidsEmptySelection:NO];
+    [self.bannedContactsTreeController setChildrenKeyPath:@"children"];
+
+    [self.banedContactsView bind:@"content" toObject:self.bannedContactsTreeController withKeyPath:@"arrangedObjects" options:nil];
+    [self.banedContactsView bind:@"sortDescriptors" toObject:self.bannedContactsTreeController withKeyPath:@"sortDescriptors" options:nil];
+    [self.banedContactsView bind:@"selectionIndexPaths" toObject:self.bannedContactsTreeController withKeyPath:@"selectionIndexPaths" options:nil];
+    NSLog(@"numberofRowsBanned, %d", account->bannedContactModel()->rowCount());
+    self.bannedListIsEmpty = banedContactsView.numberOfRows == 0;
+}
+
+- (IBAction)unbanContact:(NSView*)sender
+{
+    NSInteger row = [self.banedContactsView rowForView:sender];
+    if(row < 0) {
+        return;
+    }
+    auto account = AccountModel::instance().selectedAccount();
+    id item  = [self.banedContactsView itemAtRow:row];
+    QModelIndex qIdx = [self.bannedContactsTreeController toQIdx:((NSTreeNode*)item)];
+    if(!qIdx.isValid()) {
+        return;
+    }
+    auto cm = qIdx.data(static_cast<int>(ContactMethod::Role::Object)).value<ContactMethod*>();
+    if( account && cm) {
+        account->bannedContactModel()->remove(cm);
+    }
+    self.bannedListIsEmpty = banedContactsView.numberOfRows == 0;
+}
+
+#pragma mark - NSOutlineViewDelegate methods
+
+- (BOOL)outlineView:(NSOutlineView *)outlineView shouldSelectItem:(id)item
+{
+    return YES;
+}
+
+- (NSTableRowView *)outlineView:(NSOutlineView *)outlineView rowViewForItem:(id)item
+{
+    return [outlineView makeViewWithIdentifier:@"HoverRowView" owner:nil];
+}
+
+- (NSView *)outlineView:(NSOutlineView *)outlineView viewForTableColumn:(NSTableColumn *)tableColumn item:(id)item
+{
+    NSTableView* result = [outlineView makeViewWithIdentifier:@"BannedContactsCellView" owner:self];
+
+    QModelIndex qIdx = [self.bannedContactsTreeController toQIdx:((NSTreeNode*)item)];
+    if(!qIdx.isValid())
+        return result;
+
+    NSTextField* nameLabel = [result viewWithTag:TAG_NAME];
+    NSTextField* deviceIDLabel = [result viewWithTag:TAG_RINGID];
+
+    auto account = AccountModel::instance().selectedAccount();
+
+    NSString* stringID = account->bannedContactModel()->data(qIdx,Qt::DisplayRole).toString().toNSString();
+
+    [nameLabel setStringValue:stringID];
+    [deviceIDLabel setStringValue:stringID];
+
+    return result;
+}
+
+@end
diff --git a/src/AccountsVC.mm b/src/AccountsVC.mm
index 93fddec..d0d14d2 100644
--- a/src/AccountsVC.mm
+++ b/src/AccountsVC.mm
@@ -40,6 +40,7 @@
 #import "BackupAccountWC.h"
 #import "RestoreAccountWC.h"
 #import "RingWizardWC.h"
+#import "AccBannedContactsVC.h"
 
 @interface AccountsVC () <BackupAccountDelegate, RestoreAccountDelegate>
 
@@ -52,6 +53,7 @@
 @property (retain) IBOutlet NSTabViewItem *securityTabItem;
 @property (retain) IBOutlet NSTabViewItem *ringTabItem;
 @property (retain) IBOutlet NSTabViewItem *ringDevicesTabItem;
+@property (retain) IBOutlet NSTabViewItem *bannedListTabItem;
 
 @property QNSTreeController *treeController;
 @property (assign) IBOutlet NSOutlineView *accountsListView;
@@ -63,6 +65,7 @@
 @property AccGeneralVC* generalVC;
 @property AccMediaVC* audioVC;
 @property AccAdvancedVC* advancedVC;
+@property AccBannedContactsVC* bannedContactsVC;
 @property AccSecurityVC* securityVC;
 @property AbstractLoadingWC* accountModal;
 @property RingWizardWC* wizard;
@@ -83,6 +86,7 @@
 @synthesize treeController;
 @synthesize accountModal;
 @synthesize wizard;
+@synthesize bannedListTabItem;
 
 NSInteger const TAG_CHECK       =   100;
 NSInteger const TAG_NAME        =   200;
@@ -166,6 +170,11 @@
     [[self.devicesVC view] setFrame:[self.ringDevicesTabItem.view frame]];
     [[self.devicesVC view] setBounds:[self.ringDevicesTabItem.view bounds]];
     [self.ringDevicesTabItem setView:self.devicesVC.view];
+
+    self.bannedContactsVC = [[AccBannedContactsVC alloc] initWithNibName:@"AccBannedContacts" bundle:nil];
+    [[self.bannedContactsVC view] setFrame:[self.bannedListTabItem.view frame]];
+    [[self.bannedContactsVC view] setBounds:[self.bannedListTabItem.view bounds]];
+    [self.bannedListTabItem setView:self.bannedContactsVC.view];
 }
 
 - (void) setupSIPPanels
@@ -191,6 +200,7 @@
     [configPanels insertTabViewItem:ringDevicesTabItem atIndex:1];
     [configPanels insertTabViewItem:mediaTabItem atIndex:2];
     [configPanels insertTabViewItem:advancedTabItem atIndex:3];
+    [configPanels insertTabViewItem:bannedListTabItem atIndex:4];
 }
 
 - (IBAction)toggleAccount:(NSButton*)sender {
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>
diff --git a/ui/Base.lproj/Accounts.xib b/ui/Base.lproj/Accounts.xib
index b8efed3..de5d6d9 100644
--- a/ui/Base.lproj/Accounts.xib
+++ b/ui/Base.lproj/Accounts.xib
@@ -1,7 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11201" systemVersion="16B2553a" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11762" systemVersion="16D30a" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
     <dependencies>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11201"/>
+        <development version="7000" identifier="xcode"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11762"/>
     </dependencies>
     <objects>
         <customObject id="-2" userLabel="File's Owner" customClass="AccountsVC">
@@ -9,6 +10,7 @@
                 <outlet property="accountDetailsView" destination="Jki-s4-F1W" id="8zf-XP-bql"/>
                 <outlet property="accountsListView" destination="jXv-6I-P9R" id="MzW-0C-PN1"/>
                 <outlet property="advancedTabItem" destination="RT7-u6-bhe" id="eAT-ce-MyD"/>
+                <outlet property="bannedListTabItem" destination="b7Z-2X-diH" id="Gvp-uP-Vgw"/>
                 <outlet property="configPanels" destination="Jki-s4-F1W" id="nY4-dc-CQg"/>
                 <outlet property="generalTabItem" destination="tPR-Ac-N5Y" id="39S-pz-1Xs"/>
                 <outlet property="mediaTabItem" destination="lxr-my-vH8" id="BhJ-cS-yVi"/>
@@ -64,6 +66,12 @@
                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                             </view>
                         </tabViewItem>
+                        <tabViewItem label="Banned" identifier="" id="b7Z-2X-diH">
+                            <view key="view" id="tHP-tb-Jl4">
+                                <rect key="frame" x="10" y="33" width="576" height="442"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                            </view>
+                        </tabViewItem>
                     </tabViewItems>
                     <connections>
                         <outlet property="delegate" destination="-2" id="hfK-WK-DJT"/>