Commit 0e66aea4 authored by Alexandre Lision's avatar Alexandre Lision Committed by Stepan Salenikovich

remove quality button

this is now handled automatically by the daemon

Tuleap: #96
Change-Id: Ib0011a3bd70ed875ec66edbe6fe752fb02669dcb
parent 883719f5
......@@ -104,8 +104,6 @@ SET(ringclient_CONTROLLERS
src/HistoryVC.h
src/PersonsVC.mm
src/PersonsVC.h
src/BitrateVC.mm
src/BitrateVC.h
src/ChatVC.mm
src/ChatVC.h
src/PersonLinkerVC.mm
......
/*
* Copyright (C) 2004-2015 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.
*
* Additional permission under GNU GPL version 3 section 7:
*
* If you modify this program, or any covered work, by linking or
* combining it with the OpenSSL project's OpenSSL library (or a
* modified version of that library), containing parts covered by the
* terms of the OpenSSL or SSLeay licenses, Savoir-Faire Linux Inc.
* grants you additional permission to convey the resulting work.
* Corresponding Source for a non-source form of such a combination
* shall include the source code for the parts of OpenSSL used as well
* as that of the covered work.
*/
#import <Cocoa/Cocoa.h>
@interface BitrateVC : NSViewController
@end
/*
* Copyright (C) 2004-2015 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.
*
* Additional permission under GNU GPL version 3 section 7:
*
* If you modify this program, or any covered work, by linking or
* combining it with the OpenSSL project's OpenSSL library (or a
* modified version of that library), containing parts covered by the
* terms of the OpenSSL or SSLeay licenses, Savoir-Faire Linux Inc.
* grants you additional permission to convey the resulting work.
* Corresponding Source for a non-source form of such a combination
* shall include the source code for the parts of OpenSSL used as well
* as that of the covered work.
*/
#import "BitrateVC.h"
#import <QSortFilterProxyModel>
#import <audio/codecmodel.h>
#import <callmodel.h>
#import <accountmodel.h>
@interface BitrateVC ()
@property (unsafe_unretained) IBOutlet NSSlider *bitrateSlider;
@end
@implementation BitrateVC
- (void)viewWillAppear
{
// Get the first video codec of the selected call and use this value as default
auto selectedCall = CallModel::instance().selectedCall();
if (selectedCall) {
int bitrate = selectedCall->account()->codecModel()->videoCodecs()->index(0,0).data(static_cast<int>(CodecModel::Role::BITRATE)).toInt();
[self.bitrateSlider setNumberOfTickMarks:4];
[self.bitrateSlider setIntValue:bitrate];
[self.bitrateSlider setToolTip:[NSString stringWithFormat:@"%i bit/s",bitrate]];
}
}
- (IBAction)valueChanged:(id)sender
{
if (const auto& codecModel = CallModel::instance().selectedCall()->account()->codecModel()) {
const auto& videoCodecs = codecModel->videoCodecs();
for (int i=0; i < videoCodecs->rowCount();i++) {
const auto& idx = videoCodecs->index(i,0);
videoCodecs->setData(idx, QString::number((unsigned int)[sender integerValue]), CodecModel::Role::BITRATE);
}
codecModel << CodecModel::EditAction::SAVE;
}
[self.bitrateSlider setToolTip:[NSString stringWithFormat:@"%i bit/s",[sender intValue]]];
}
@end
......@@ -61,7 +61,6 @@
@property (unsafe_unretained) IBOutlet NSButton* muteAudioButton;
@property (unsafe_unretained) IBOutlet NSButton* muteVideoButton;
@property (unsafe_unretained) IBOutlet NSButton* addContactButton;
@property (unsafe_unretained) IBOutlet NSButton* qualityButton;
@property (unsafe_unretained) IBOutlet NSButton* transferButton;
@property (unsafe_unretained) IBOutlet NSView* headerContainer;
......@@ -72,7 +71,6 @@
@property (unsafe_unretained) IBOutlet NSSplitView* splitView;
@property (unsafe_unretained) IBOutlet NSButton* chatButton;
@property (strong) IBOutlet NSPopover* qualityPopOver;
@property (strong) NSPopover* addToContactPopover;
@property (strong) NSPopover* transferPopoverVC;
@property (strong) IBOutlet ChatVC* chatVC;
......@@ -137,7 +135,6 @@
// Default values for this views
[loadingIndicator setHidden:YES];
[self.qualityButton setHidden:YES];
[self.chatButton setHidden:YES];
[videoView setShouldAcceptInteractions:NO];
......@@ -160,7 +157,6 @@
case Call::State::CURRENT:
[videoView setShouldAcceptInteractions:YES];
[self.chatButton setHidden:NO];
[self.qualityButton setHidden:NO];
break;
case Call::State::HOLD:
break;
......@@ -222,7 +218,6 @@
[loadingIndicator setLengthOfLine:2];
[loadingIndicator setInnerMargin:30];
[self.qualityPopOver setDelegate:self];
[self.videoView setCallDelegate:self];
[self connect];
......@@ -464,7 +459,7 @@
[self.transferPopoverVC performClose:self];
[self.addToContactPopover performClose:self];
[self.qualityPopOver performClose:self];
[self.chatButton setState:NSOffState];
[self collapseRightView];
}
......@@ -605,12 +600,6 @@
UserActionModel* uam = CallModel::instance().userActionModel();
uam << UserActionModel::Action::MUTE_VIDEO;
}
- (IBAction)displayQualityPopUp:(id)sender {
[self.qualityPopOver showRelativeToRect:[sender bounds] ofView:sender preferredEdge:NSMaxXEdge];
[videoView setCallDelegate:nil];
}
- (IBAction)toggleTransferView:(id)sender {
if (self.transferPopoverVC != nullptr) {
......@@ -644,7 +633,6 @@
self.addToContactPopover = NULL;
}
[self.qualityButton setState:NSOffState];
[self.addContactButton setState:NSOffState];
[self.transferButton setState:NSOffState];
}
......
......@@ -2,14 +2,20 @@
/* Class = "NSTextFieldCell"; title = "URI"; ObjectID = "Dqv-um-UUk"; */
"Dqv-um-UUk.title" = "URI";
/* Class = "NSButtonCell"; title = "Answer"; ObjectID = "KPG-pB-gPm"; */
"KPG-pB-gPm.title" = "Answer";
/* Class = "NSTextFieldCell"; title = "details"; ObjectID = "FHf-0w-WGz"; */
"FHf-0w-WGz.title" = "details";
/* Class = "NSTextFieldCell"; title = "+"; ObjectID = "b3D-0u-zMG"; */
"b3D-0u-zMG.title" = "+";
/* Class = "NSTextFieldCell"; title = "Display Role"; ObjectID = "FhU-gw-okq"; */
"FhU-gw-okq.title" = "Display Role";
/* Class = "NSTextFieldCell"; title = "-"; ObjectID = "gB4-S1-mny"; */
"gB4-S1-mny.title" = "-";
/* Class = "NSSearchFieldCell"; placeholderString = "Search or enter number"; ObjectID = "GeP-AW-8mu"; */
"GeP-AW-8mu.placeholderString" = "Search or enter number";
/* Class = "NSTextFieldCell"; title = "Text Cell"; ObjectID = "GjO-zY-hdp"; */
"GjO-zY-hdp.title" = "Text Cell";
/* Class = "NSButtonCell"; title = "Answer"; ObjectID = "KPG-pB-gPm"; */
"KPG-pB-gPm.title" = "Answer";
/* Class = "NSButtonCell"; title = "Button"; ObjectID = "kxH-yM-TLd"; */
"kxH-yM-TLd.title" = "Button";
......@@ -17,9 +23,6 @@
/* Class = "NSTextFieldCell"; title = "Person name"; ObjectID = "osk-LS-0Qg"; */
"osk-LS-0Qg.title" = "Person name";
/* Class = "NSButtonCell"; title = "Record"; ObjectID = "rhz-4Z-avV"; */
"rhz-4Z-avV.title" = "Record";
/* Class = "NSTextFieldCell"; title = "State"; ObjectID = "ugy-uK-901"; */
"ugy-uK-901.title" = "State";
......
This diff is collapsed.
......@@ -13,12 +13,3 @@
/* Class = "NSTextFieldCell"; title = "Camera"; ObjectID = "YCM-JC-jin"; */
"YCM-JC-jin.title" = "Camera";
/* Class = "NSMenu"; title = "rates"; ObjectID = "aKL-76-vSP"; */
"aKL-76-vSP.title" = "rates";
/* Class = "NSMenu"; title = "sizes"; ObjectID = "ykd-50-las"; */
"ykd-50-las.title" = "sizes";
/* Class = "NSMenu"; title = "devices"; ObjectID = "zJ9-1a-cpr"; */
"zJ9-1a-cpr.title" = "devices";
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