Commit e4d61cb1 authored by Alexandre Lision's avatar Alexandre Lision

account: merge audio and video panel

AccVideoVC + AccAudioVC = AccMediaVC

Tuleap: #406
Change-Id: I757d66322975b9362e42cb313a6f50986591bef6
parent eccf8aed
......@@ -81,10 +81,8 @@ SET(ringclient_CONTROLLERS
src/PreferencesWC.h
src/AccGeneralVC.mm
src/AccGeneralVC.h
src/AccVideoVC.mm
src/AccVideoVC.h
src/AccAudioVC.mm
src/AccAudioVC.h
src/AccMediaVC.mm
src/AccMediaVC.h
src/AccRingVC.mm
src/AccRingVC.h
src/AccAdvancedVC.mm
......@@ -157,8 +155,7 @@ SET(ringclient_XIBS
GeneralPrefs
Accounts
AccGeneral
AccAudio
AccVideo
AccMedia
AccRing
AccAdvanced
AccSecurity
......
......@@ -23,6 +23,6 @@
#import "QNSTreeController.h"
@interface AccAudioVC : NSViewController <NSOutlineViewDelegate>
@interface AccMediaVC : NSViewController <NSOutlineViewDelegate>
@end
\ No newline at end of file
......@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#import "AccAudioVC.h"
#import "AccMediaVC.h"
///Qt
#import <QSortFilterProxyModel>
......@@ -28,29 +28,37 @@
#import <ringtonemodel.h>
#import <ringtone.h>
@interface AccAudioVC ()
@interface AccMediaVC ()
@property QNSTreeController* treeController;
@property (assign) IBOutlet NSOutlineView* codecsView;
@property QNSTreeController* audioTreeController;
@property QNSTreeController* videoTreeController;
@property (unsafe_unretained) IBOutlet NSPopUpButton* ringtonePopUpButton;
@property (unsafe_unretained) IBOutlet NSButton* enableRingtone;
@property (unsafe_unretained) IBOutlet NSButton* playRingtone;
@property (unsafe_unretained) IBOutlet NSButton *toggleVideoButton;
@property (unsafe_unretained) IBOutlet NSOutlineView* audioCodecView;
@property (unsafe_unretained) IBOutlet NSOutlineView* videoCodecView;
@property (unsafe_unretained) IBOutlet NSView* videoPanelContainer;
@end
@implementation AccAudioVC
@synthesize treeController;
@synthesize codecsView;
@synthesize ringtonePopUpButton, enableRingtone, playRingtone;
@implementation AccMediaVC
@synthesize audioTreeController, videoTreeController;
@synthesize audioCodecView, videoCodecView;
@synthesize videoPanelContainer;
@synthesize ringtonePopUpButton, enableRingtone, playRingtone, toggleVideoButton;
NSInteger const TAG_CHECK = 100;
NSInteger const TAG_NAME = 200;
NSInteger const TAG_FREQUENCY = 300;
NSInteger const TAG_DETAILS = 300;
NSString* const ID_AUDIO = @"audioview";
NSString* const ID_VIDEO = @"videoview";
- (void) loadView
{
[super loadView];
NSLog(@"INIT Audio VC");
NSLog(@"INIT Media VC");
QObject::connect(AccountModel::instance().selectionModel(),
&QItemSelectionModel::currentChanged,
[=](const QModelIndex &current, const QModelIndex &previous) {
......@@ -77,15 +85,26 @@ NSInteger const TAG_FREQUENCY = 300;
- (void)loadAccount
{
auto account = AccountModel::instance().selectedAccount();
treeController = [[QNSTreeController alloc] initWithQModel:account->codecModel()->audioCodecs()];
// AUDIO
[self loadAudioPrefs];
[treeController setAvoidsEmptySelection:NO];
[treeController setChildrenKeyPath:@"children"];
// VIDEO
[self loadVideoPrefs];
[codecsView bind:@"content" toObject:treeController withKeyPath:@"arrangedObjects" options:nil];
[codecsView bind:@"sortDescriptors" toObject:treeController withKeyPath:@"sortDescriptors" options:nil];
[codecsView bind:@"selectionIndexPaths" toObject:treeController withKeyPath:@"selectionIndexPaths" options:nil];
}
#pragma Audio Preferences method
- (void) loadAudioPrefs
{
auto account = AccountModel::instance().selectedAccount();
audioTreeController = [[QNSTreeController alloc] initWithQModel:account->codecModel()->audioCodecs()];
[audioTreeController setAvoidsEmptySelection:NO];
[audioTreeController setChildrenKeyPath:@"children"];
[audioCodecView bind:@"content" toObject:audioTreeController withKeyPath:@"arrangedObjects" options:nil];
[audioCodecView bind:@"sortDescriptors" toObject:audioTreeController withKeyPath:@"sortDescriptors" options:nil];
[audioCodecView bind:@"selectionIndexPaths" toObject:audioTreeController withKeyPath:@"selectionIndexPaths" options:nil];
[audioCodecView setIdentifier:ID_AUDIO];
QModelIndex qIdx = RingtoneModel::instance().selectionModel(account)->currentIndex();
[ringtonePopUpButton removeAllItems];
......@@ -111,9 +130,9 @@ NSInteger const TAG_FREQUENCY = 300;
RingtoneModel::instance().selectionModel(AccountModel::instance().selectedAccount())->setCurrentIndex(qIdx, QItemSelectionModel::ClearAndSelect);
}
- (IBAction)moveUp:(id)sender {
if([[treeController selectedNodes] count] > 0) {
QModelIndex qIdx = [treeController toQIdx:[treeController selectedNodes][0]];
- (IBAction)moveAudioCodecUp:(id)sender {
if([[audioTreeController selectedNodes] count] > 0) {
QModelIndex qIdx = [audioTreeController toQIdx:[audioTreeController selectedNodes][0]];
if(!qIdx.isValid())
return;
......@@ -122,9 +141,9 @@ NSInteger const TAG_FREQUENCY = 300;
}
}
- (IBAction)moveDown:(id)sender {
if([[treeController selectedNodes] count] > 0) {
QModelIndex qIdx = [treeController toQIdx:[treeController selectedNodes][0]];
- (IBAction)moveAudioCodecDown:(id)sender {
if([[audioTreeController selectedNodes] count] > 0) {
QModelIndex qIdx = [audioTreeController toQIdx:[audioTreeController selectedNodes][0]];
if(!qIdx.isValid())
return;
......@@ -133,12 +152,65 @@ NSInteger const TAG_FREQUENCY = 300;
}
}
- (IBAction)toggleCodec:(NSButton*)sender {
NSInteger row = [codecsView rowForView:sender];
- (IBAction)toggleAudioCodec:(NSButton*)sender {
NSInteger row = [audioCodecView rowForView:sender];
QModelIndex qIdx = AccountModel::instance().selectedAccount()->codecModel()->audioCodecs()->index(row, 0, QModelIndex());
AccountModel::instance().selectedAccount()->codecModel()->audioCodecs()->setData(qIdx, sender.state == NSOnState ? Qt::Checked : Qt::Unchecked, Qt::CheckStateRole);
}
#pragma Video Preferences method
-(void) loadVideoPrefs
{
auto account = AccountModel::instance().selectedAccount();
videoTreeController = [[QNSTreeController alloc] initWithQModel:account->codecModel()->videoCodecs()];
[videoTreeController setAvoidsEmptySelection:NO];
[videoTreeController setChildrenKeyPath:@"children"];
[videoCodecView setIdentifier:ID_VIDEO];
[videoCodecView bind:@"content" toObject:videoTreeController withKeyPath:@"arrangedObjects" options:nil];
[videoCodecView bind:@"sortDescriptors" toObject:videoTreeController withKeyPath:@"sortDescriptors" options:nil];
[videoCodecView bind:@"selectionIndexPaths" toObject:videoTreeController withKeyPath:@"selectionIndexPaths" options:nil];
[videoPanelContainer setHidden:!account->isVideoEnabled()];
[toggleVideoButton setState:account->isVideoEnabled()?NSOnState:NSOffState];
}
- (IBAction)toggleVideoEnabled:(id)sender {
AccountModel::instance().selectedAccount()->setVideoEnabled([sender state] == NSOnState);
[videoPanelContainer setHidden:!AccountModel::instance().selectedAccount()->isVideoEnabled()];
}
- (IBAction)toggleVideoCodec:(NSButton*)sender {
NSInteger row = [videoCodecView rowForView:sender];
QModelIndex qIdx = AccountModel::instance().selectedAccount()->codecModel()->videoCodecs()->index(row, 0, QModelIndex());
AccountModel::instance().selectedAccount()->codecModel()->videoCodecs()->setData(qIdx, sender.state == NSOnState ? Qt::Checked : Qt::Unchecked, Qt::CheckStateRole);
}
- (IBAction)moveVideoCodecUp:(id)sender {
if([[videoTreeController selectedNodes] count] > 0) {
QModelIndex qIdx = [videoTreeController toQIdx:[videoTreeController selectedNodes][0]];
if(!qIdx.isValid())
return;
QMimeData* mime = AccountModel::instance().selectedAccount()->codecModel()->mimeData(QModelIndexList() << qIdx);
AccountModel::instance().selectedAccount()->codecModel()->dropMimeData(mime, Qt::MoveAction, qIdx.row() - 1, 0, QModelIndex());
}
}
- (IBAction)moveVideoCodecDown:(id)sender {
if([[videoTreeController selectedNodes] count] > 0) {
QModelIndex qIdx = [videoTreeController toQIdx:[videoTreeController selectedNodes][0]];
if(!qIdx.isValid())
return;
QMimeData* mime = AccountModel::instance().selectedAccount()->codecModel()->mimeData(QModelIndexList() << qIdx);
AccountModel::instance().selectedAccount()->codecModel()->dropMimeData(mime, Qt::MoveAction, qIdx.row() + 1, 0, QModelIndex());
}
}
#pragma mark - NSOutlineViewDelegate methods
- (BOOL)outlineView:(NSOutlineView *)outlineView shouldSelectItem:(id)item;
......@@ -150,16 +222,27 @@ NSInteger const TAG_FREQUENCY = 300;
{
NSTableView* result = [outlineView makeViewWithIdentifier:@"CodecView" owner:self];
QModelIndex qIdx = [treeController toQIdx:((NSTreeNode*)item)];
QModelIndex qIdx;
if ([outlineView.identifier isEqualToString:ID_AUDIO])
qIdx = [audioTreeController toQIdx:((NSTreeNode*)item)];
else
qIdx = [videoTreeController toQIdx:((NSTreeNode*)item)];
if(!qIdx.isValid())
return result;
NSTextField* name = [result viewWithTag:TAG_NAME];
NSTextField* frequency = [result viewWithTag:TAG_FREQUENCY];
NSTextField* details = [result viewWithTag:TAG_DETAILS];
NSButton* check = [result viewWithTag:TAG_CHECK];
[name setStringValue:AccountModel::instance().selectedAccount()->codecModel()->audioCodecs()->data(qIdx, CodecModel::Role::NAME).toString().toNSString()];
[frequency setStringValue:[NSString stringWithFormat:@"%@ Hz", AccountModel::instance().selectedAccount()->codecModel()->audioCodecs()->data(qIdx, CodecModel::Role::SAMPLERATE).toString().toNSString()]];
[check setState:AccountModel::instance().selectedAccount()->codecModel()->audioCodecs()->data(qIdx, Qt::CheckStateRole).value<BOOL>()?NSOnState:NSOffState];
if ([outlineView.identifier isEqualToString:ID_AUDIO]) {
[name setStringValue:AccountModel::instance().selectedAccount()->codecModel()->audioCodecs()->data(qIdx, CodecModel::Role::NAME).toString().toNSString()];
[details setStringValue:[NSString stringWithFormat:@"%@ Hz", AccountModel::instance().selectedAccount()->codecModel()->audioCodecs()->data(qIdx, CodecModel::Role::SAMPLERATE).toString().toNSString()]];
[check setState:AccountModel::instance().selectedAccount()->codecModel()->audioCodecs()->data(qIdx, Qt::CheckStateRole).value<BOOL>()?NSOnState:NSOffState];
} else {
[name setStringValue:AccountModel::instance().selectedAccount()->codecModel()->videoCodecs()->data(qIdx, CodecModel::Role::NAME).toString().toNSString()];
[check setState:AccountModel::instance().selectedAccount()->codecModel()->videoCodecs()->data(qIdx, Qt::CheckStateRole).value<BOOL>()?NSOnState:NSOffState];
}
return result;
}
......
/*
* Copyright (C) 2015-2016 Savoir-faire Linux Inc.
* Author: Alexandre Lision <alexandre.lision@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>
#import <account.h>
@interface AccVideoVC : NSViewController <NSOutlineViewDelegate>
@end
\ No newline at end of file
/*
* Copyright (C) 2015-2016 Savoir-faire Linux Inc.
* Author: Alexandre Lision <alexandre.lision@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.
*/
#define COLUMNID_STATE @"VideoStateColumn"
#define COLUMNID_CODECS @"VideoCodecsColumn"
#define COLUMNID_FREQ @"VideoFrequencyColumn"
#define COLUMNID_BITRATE @"VideoBitrateColumn"
#import "AccVideoVC.h"
#include <QtCore/QSortFilterProxyModel>
#import <audio/codecmodel.h>
#import <accountmodel.h>
#import <qitemselectionmodel.h>
#import "QNSTreeController.h"
@interface AccVideoVC ()
@property QNSTreeController *treeController;
@property (assign) IBOutlet NSOutlineView *codecsView;
@property (assign) IBOutlet NSView *videoPanelContainer;
@property (assign) IBOutlet NSButton *toggleVideoButton;
@end
@implementation AccVideoVC
@synthesize treeController;
@synthesize codecsView;
@synthesize videoPanelContainer;
@synthesize toggleVideoButton;
- (void)awakeFromNib
{
NSLog(@"INIT Video VC");
QObject::connect(AccountModel::instance().selectionModel(),
&QItemSelectionModel::currentChanged,
[=](const QModelIndex &current, const QModelIndex &previous) {
if(!current.isValid())
return;
[self loadAccount];
});
}
- (Account*) currentAccount
{
auto accIdx = AccountModel::instance().selectionModel()->currentIndex();
return AccountModel::instance().getAccountByModelIndex(accIdx);
}
- (void)loadAccount
{
auto account = [self currentAccount];
treeController = [[QNSTreeController alloc] initWithQModel:account->codecModel()->videoCodecs()];
[treeController setAvoidsEmptySelection:NO];
[treeController setChildrenKeyPath:@"children"];
[codecsView bind:@"content" toObject:treeController withKeyPath:@"arrangedObjects" options:nil];
[codecsView bind:@"sortDescriptors" toObject:treeController withKeyPath:@"sortDescriptors" options:nil];
[codecsView bind:@"selectionIndexPaths" toObject:treeController withKeyPath:@"selectionIndexPaths" options:nil];
[videoPanelContainer setHidden:!account->isVideoEnabled()];
[toggleVideoButton setState:account->isVideoEnabled()?NSOnState:NSOffState];
}
- (IBAction)toggleVideoEnabled:(id)sender {
[self currentAccount]->setVideoEnabled([sender state] == NSOnState);
[videoPanelContainer setHidden:![self currentAccount]->isVideoEnabled()];
}
- (IBAction)toggleCodec:(NSOutlineView*)sender {
NSInteger row = [sender clickedRow];
NSTableColumn *col = [sender tableColumnWithIdentifier:COLUMNID_STATE];
NSButtonCell *cell = [col dataCellForRow:row];
[self currentAccount]->codecModel()->videoCodecs()->setData([self currentAccount]->codecModel()->videoCodecs()->index(row, 0, QModelIndex()),
cell.state == NSOnState ? Qt::Unchecked : Qt::Checked, Qt::CheckStateRole);
}
- (IBAction)moveUp:(id)sender {
if([[treeController selectedNodes] count] > 0) {
QModelIndex qIdx = [treeController toQIdx:[treeController selectedNodes][0]];
if(!qIdx.isValid())
return;
QMimeData* mime = [self currentAccount]->codecModel()->mimeData(QModelIndexList() << qIdx);
[self currentAccount]->codecModel()->dropMimeData(mime, Qt::MoveAction, qIdx.row() - 1, 0, QModelIndex());
}
}
- (IBAction)moveDown:(id)sender {
if([[treeController selectedNodes] count] > 0) {
QModelIndex qIdx = [treeController toQIdx:[treeController selectedNodes][0]];
if(!qIdx.isValid())
return;
QMimeData* mime = [self currentAccount]->codecModel()->mimeData(QModelIndexList() << qIdx);
[self currentAccount]->codecModel()->dropMimeData(mime, Qt::MoveAction, qIdx.row() + 1, 0, QModelIndex());
}
}
#pragma mark - NSOutlineViewDelegate methods
// -------------------------------------------------------------------------------
// shouldSelectItem:item
// -------------------------------------------------------------------------------
- (BOOL)outlineView:(NSOutlineView *)outlineView shouldSelectItem:(id)item;
{
return YES;
}
// -------------------------------------------------------------------------------
// dataCellForTableColumn:tableColumn:item
// -------------------------------------------------------------------------------
- (NSCell *)outlineView:(NSOutlineView *)outlineView dataCellForTableColumn:(NSTableColumn *)tableColumn item:(id)item
{
NSCell *returnCell = [tableColumn dataCell];
if(item == nil)
return returnCell;
return returnCell;
}
// -------------------------------------------------------------------------------
// textShouldEndEditing:fieldEditor
// -------------------------------------------------------------------------------
- (BOOL)control:(NSControl *)control textShouldEndEditing:(NSText *)fieldEditor
{
if ([[fieldEditor string] length] == 0)
{
// don't allow empty node names
return NO;
}
else
{
return YES;
}
}
// -------------------------------------------------------------------------------
// shouldEditTableColumn:tableColumn:item
//
// Decide to allow the edit of the given outline view "item".
// -------------------------------------------------------------------------------
- (BOOL)outlineView:(NSOutlineView *)outlineView shouldEditTableColumn:(NSTableColumn *)tableColumn item:(id)item
{
return NO;
}
// -------------------------------------------------------------------------------
// outlineView:willDisplayCell:forTableColumn:item
// -------------------------------------------------------------------------------
- (void)outlineView:(NSOutlineView *)olv willDisplayCell:(NSCell*)cell forTableColumn:(NSTableColumn *)tableColumn item:(id)item
{
QModelIndex qIdx = [treeController toQIdx:((NSTreeNode*)item)];
if(!qIdx.isValid())
return;
if([[tableColumn identifier] isEqualToString:COLUMNID_STATE]) {
[cell setState:[self currentAccount]->codecModel()->videoCodecs()->data(qIdx, Qt::CheckStateRole).value<BOOL>()?NSOnState:NSOffState];
} else if ([[tableColumn identifier] isEqualToString:COLUMNID_CODECS])
{
cell.title = [self currentAccount]->codecModel()->videoCodecs()->data(qIdx, CodecModel::Role::NAME).toString().toNSString();
[cell setState:[self currentAccount]->codecModel()->videoCodecs()->data(qIdx, Qt::CheckStateRole).value<BOOL>()?NSOnState:NSOffState];
} else if ([[tableColumn identifier] isEqualToString:COLUMNID_FREQ])
{
cell.title = [self currentAccount]->codecModel()->videoCodecs()->data(qIdx, CodecModel::Role::SAMPLERATE).toString().toNSString();
} else if ([[tableColumn identifier] isEqualToString:COLUMNID_BITRATE])
{
cell.title = [self currentAccount]->codecModel()->videoCodecs()->data(qIdx, CodecModel::Role::BITRATE).toString().toNSString();
}
}
// -------------------------------------------------------------------------------
// outlineViewSelectionDidChange:notification
// -------------------------------------------------------------------------------
- (void)outlineViewSelectionDidChange:(NSNotification *)notification
{
// ask the tree controller for the current selection
}
@end
......@@ -32,8 +32,7 @@
#import "QNSTreeController.h"
#import "AccGeneralVC.h"
#import "AccAudioVC.h"
#import "AccVideoVC.h"
#import "AccMediaVC.h"
#import "AccAdvancedVC.h"
#import "AccSecurityVC.h"
#import "AccRingVC.h"
......@@ -57,8 +56,7 @@ public:
@property (assign) IBOutlet NSTabView *configPanels;
@property (retain) IBOutlet NSTabViewItem *generalTabItem;
@property (retain) IBOutlet NSTabViewItem *audioTabItem;
@property (retain) IBOutlet NSTabViewItem *videoTabItem;
@property (retain) IBOutlet NSTabViewItem *mediaTabItem;
@property (retain) IBOutlet NSTabViewItem *advancedTabItem;
@property (retain) IBOutlet NSTabViewItem *securityTabItem;
@property (retain) IBOutlet NSTabViewItem *ringTabItem;
......@@ -70,8 +68,7 @@ public:
@property AccRingVC* ringVC;
@property AccGeneralVC* generalVC;
@property AccAudioVC* audioVC;
@property AccVideoVC* videoVC;
@property AccMediaVC* audioVC;
@property AccAdvancedVC* advancedVC;
@property AccSecurityVC* securityVC;
......@@ -81,8 +78,7 @@ public:
@synthesize protocolList;
@synthesize configPanels;
@synthesize generalTabItem;
@synthesize audioTabItem;
@synthesize videoTabItem;
@synthesize mediaTabItem;
@synthesize advancedTabItem;
@synthesize securityTabItem;
@synthesize ringTabItem;
......@@ -122,15 +118,10 @@ public:
[[self.generalVC view] setBounds:[self.generalTabItem.view bounds]];
[self.generalTabItem setView:self.generalVC.view];
self.audioVC = [[AccAudioVC alloc] initWithNibName:@"AccAudio" bundle:nil];
[[self.audioVC view] setFrame:[self.audioTabItem.view frame]];
[[self.audioVC view] setBounds:[self.audioTabItem.view bounds]];
[self.audioTabItem setView:self.audioVC.view];
self.videoVC = [[AccVideoVC alloc] initWithNibName:@"AccVideo" bundle:nil];
[[self.videoVC view] setFrame:[self.videoTabItem.view frame]];
[[self.videoVC view] setBounds:[self.videoTabItem.view bounds]];
[self.videoTabItem setView:self.videoVC.view];
self.audioVC = [[AccMediaVC alloc] initWithNibName:@"AccMedia" bundle:nil];
[[self.audioVC view] setFrame:[self.mediaTabItem.view frame]];
[[self.audioVC view] setBounds:[self.mediaTabItem.view bounds]];
[self.mediaTabItem setView:self.audioVC.view];
self.advancedVC = [[AccAdvancedVC alloc] initWithNibName:@"AccAdvanced" bundle:nil];
[[self.advancedVC view] setFrame:[self.advancedTabItem.view frame]];
......@@ -196,10 +187,9 @@ public:
}
[configPanels insertTabViewItem:generalTabItem atIndex:0];
[configPanels insertTabViewItem:audioTabItem atIndex:1];
[configPanels insertTabViewItem:videoTabItem atIndex:2];
[configPanels insertTabViewItem:advancedTabItem atIndex:3];
[configPanels insertTabViewItem:securityTabItem atIndex:4];
[configPanels insertTabViewItem:mediaTabItem atIndex:1];
[configPanels insertTabViewItem:advancedTabItem atIndex:2];
[configPanels insertTabViewItem:securityTabItem atIndex:3];
}
- (void) setupIAXPanels
......@@ -210,8 +200,7 @@ public:
}
[configPanels insertTabViewItem:generalTabItem atIndex:0];
[configPanels insertTabViewItem:audioTabItem atIndex:1];
[configPanels insertTabViewItem:videoTabItem atIndex:2];
[configPanels insertTabViewItem:mediaTabItem atIndex:1];
}
- (void) setupRINGPanels
......@@ -222,9 +211,8 @@ public:
}
[configPanels insertTabViewItem:ringTabItem atIndex:0];
[configPanels insertTabViewItem:audioTabItem atIndex:1];
[configPanels insertTabViewItem:videoTabItem atIndex:2];
[configPanels insertTabViewItem:advancedTabItem atIndex:3];
[configPanels insertTabViewItem:mediaTabItem atIndex:1];
[configPanels insertTabViewItem:advancedTabItem atIndex:2];
}
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="8191" systemVersion="14F27" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="8191"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="AccVideoVC">
<connections>
<outlet property="codecsView" destination="H2b-i2-whr" id="bYR-bH-sP6"/>
<outlet property="toggleVideoButton" destination="cmS-cV-mVo" id="gSM-x9-hli"/>
<outlet property="videoPanelContainer" destination="qN4-Se-Waf" id="dfa-7c-bzY"/>
<outlet property="view" destination="c22-O7-iKe" id="H3B-2k-h1y"/>
</connections>
</customObject>
<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="432" height="342"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<subviews>
<button ambiguous="YES" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="cmS-cV-mVo">
<rect key="frame" x="18" y="306" width="102" height="18"/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="98" id="cjj-gb-QeP"/>
</constraints>
<buttonCell key="cell" type="check" title="Enable video" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="ZYO-6G-DC2">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<action selector="toggleVideoEnabled:" target="-2" id="nS4-3Q-Exm"/>
</connections>
</button>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="qN4-Se-Waf">
<rect key="frame" x="33" y="55" width="379" height="245"/>
<subviews>