Commit a3a43dca authored by Alexandre Lision's avatar Alexandre Lision Committed by Kateryna Kostiuk

smartlist: change first responder

Switch between Smart, contacts and history list can be hard. User have
to set focus on the smartlist component in order to activate the menu
items in the top screen bar under the 'Show' button.

By changing the first responder to the Ring window, this items are
always enabled. Actions are then forwarded to the panel view controller

This will be usefull for trust request because we will need to display
the contact list associated with an account

This commit also adds a solit horizontal grid on History and Contact
screen to be coherent with Smartlist look

Change-Id: I02baeb408828f36b098a1d8d22b53d252213b6e2
Tuleap: #1553
Reviewed-by: Kateryna Kostiuk's avatarKateryna Kostiuk <kateryna.kostiuk@savoirfairelinux.com>
parent 14b454fa
......@@ -38,6 +38,7 @@
#import "MigrateRingAccountsWC.h"
#import "ConversationVC.h"
#import "PreferencesWC.h"
#import "SmartViewVC.h"
#import "views/IconButton.h"
#import "views/NSColor+RingTheme.h"
#import "views/BackgroundView.h"
......@@ -59,6 +60,7 @@
__unsafe_unretained IBOutlet NSImageView* qrcodeView;
PreferencesWC* preferencesWC;
IBOutlet SmartViewVC* smartViewVC;
CurrentCallVC* currentCallVC;
ConversationVC* offlineVC;
......@@ -277,6 +279,21 @@ static NSString* const kPreferencesIdentifier = @"PreferencesIdentifier";
[preferencesWC.window makeKeyAndOrderFront:preferencesWC.window];
}
- (IBAction)showHistory:(NSButton*)sender
{
[smartViewVC showHistory];
}
- (IBAction)showContacts:(NSButton*)sender
{
[smartViewVC showContacts];
}
- (IBAction)showSmartlist:(NSButton*)sender
{
[smartViewVC showSmartlist];
}
#pragma mark - Ring account migration
- (void) migrateRingAccount:(Account*) acc
......
......@@ -21,4 +21,10 @@
@interface SmartViewVC : NSViewController <NSTextFieldDelegate>
- (void)showHistory;
- (void)showContacts;
- (void)showSmartlist;
@end
......@@ -181,17 +181,17 @@ NSInteger const CANCEL_BUTTON_TAG = 600;
}
}
- (IBAction)showHistory:(NSButton*)sender
- (void)showHistory
{
[tabbar selectTabViewItemAtIndex:1];
}
- (IBAction)showContacts:(NSButton*)sender
- (void)showContacts
{
[tabbar selectTabViewItemAtIndex:2];
}
- (IBAction)showSmartlist:(NSButton*)sender
- (void)showSmartlist
{
[tabbar selectTabViewItemAtIndex:0];
}
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="9532" systemVersion="15D21" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11762" systemVersion="16D32" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="9532"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11762"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="NSApplication">
<customObject id="-2" userLabel="File's Owner" customClass="RingWindowController">
<connections>
<outlet property="delegate" destination="494" id="495"/>
</connections>
......
<?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="16D32" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11201"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11762"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="RingWindowController">
......@@ -13,6 +14,7 @@
<outlet property="qrcodeView" destination="dZR-JL-MY4" id="6Jf-42-qwY"/>
<outlet property="ringIDLabel" destination="JN3-vO-zcd" id="WHd-L7-6od"/>
<outlet property="shareButton" destination="Oac-o7-2Ge" id="b0D-xr-PCx"/>
<outlet property="smartViewVC" destination="jrf-42-1l2" id="lM5-3U-244"/>
<outlet property="welcomeContainer" destination="D6e-KX-8gC" id="zV3-38-ClK"/>
<outlet property="window" destination="F0z-JX-Cv5" id="Dtg-mG-RBq"/>
</connections>
......@@ -24,7 +26,7 @@
<windowCollectionBehavior key="collectionBehavior" fullScreenPrimary="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="196" y="240" width="1053" height="658"/>
<rect key="screenRect" x="0.0" y="0.0" width="1440" height="900"/>
<rect key="screenRect" x="0.0" y="0.0" width="1680" height="1050"/>
<view key="contentView" autoresizesSubviews="NO" id="se5-gp-TjO">
<rect key="frame" x="0.0" y="0.0" width="1053" height="658"/>
<autoresizingMask key="autoresizingMask"/>
......@@ -237,20 +239,21 @@
</tabViewItem>
<tabViewItem label="History" identifier="1" id="Wi9-Zd-O1N">
<view key="view" id="h2E-qI-upQ">
<rect key="frame" x="0.0" y="0.0" width="324" height="690"/>
<rect key="frame" x="0.0" y="0.0" width="324" height="612"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<scrollView borderType="none" autohidesScrollers="YES" horizontalLineScroll="72" horizontalPageScroll="10" verticalLineScroll="72" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" horizontalScrollElasticity="none" translatesAutoresizingMaskIntoConstraints="NO" id="9uI-D5-KRt">
<rect key="frame" x="0.0" y="0.0" width="324" height="690"/>
<rect key="frame" x="0.0" y="0.0" width="324" height="612"/>
<clipView key="contentView" drawsBackground="NO" copiesOnScroll="NO" id="eME-fQ-3QX">
<rect key="frame" x="0.0" y="0.0" width="324" height="690"/>
<autoresizingMask key="autoresizingMask"/>
<rect key="frame" x="0.0" y="0.0" width="324" height="612"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<outlineView focusRingType="none" verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" multipleSelection="NO" autosaveColumns="NO" rowHeight="70" rowSizeStyle="automatic" viewBased="YES" indentationPerLevel="3" outlineTableColumn="pTT-gU-NVa" id="rr8-UC-gGF" customClass="RingOutlineView">
<rect key="frame" x="0.0" y="0.0" width="324" height="690"/>
<rect key="frame" x="0.0" y="0.0" width="324" height="612"/>
<autoresizingMask key="autoresizingMask"/>
<size key="intercellSpacing" width="3" height="2"/>
<color key="backgroundColor" white="1" alpha="0.0" colorSpace="deviceWhite"/>
<tableViewGridLines key="gridStyleMask" horizontal="YES"/>
<color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
<tableColumns>
<tableColumn identifier="" width="321" minWidth="40" maxWidth="1000" id="pTT-gU-NVa">
......@@ -374,13 +377,14 @@
<rect key="frame" x="0.0" y="0.0" width="324" height="612"/>
<clipView key="contentView" focusRingType="none" drawsBackground="NO" copiesOnScroll="NO" id="S00-xr-jYM">
<rect key="frame" x="0.0" y="0.0" width="324" height="612"/>
<autoresizingMask key="autoresizingMask"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<outlineView focusRingType="none" verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" multipleSelection="NO" autosaveColumns="NO" rowHeight="70" rowSizeStyle="automatic" viewBased="YES" indentationPerLevel="10" outlineTableColumn="8Ve-L0-o7V" id="Hrg-Fe-uGq" customClass="RingOutlineView">
<rect key="frame" x="0.0" y="0.0" width="324" height="612"/>
<autoresizingMask key="autoresizingMask"/>
<size key="intercellSpacing" width="3" height="2"/>
<color key="backgroundColor" white="1" alpha="0.0" colorSpace="deviceWhite"/>
<tableViewGridLines key="gridStyleMask" horizontal="YES"/>
<color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
<tableColumns>
<tableColumn identifier="NameColumn" width="320.7734375" minWidth="40" maxWidth="1000" id="8Ve-L0-o7V">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment