diff --git a/CMakeLists.txt b/CMakeLists.txt index 9b44305a7adbfbbfc21bb6280588ccbaff96a124..a8d14c11beebe98ba642de705e666b26d0555d8e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 diff --git a/src/BitrateVC.h b/src/BitrateVC.h deleted file mode 100644 index dafaef04100f64a95e07bf267b7d56af2d5d793e..0000000000000000000000000000000000000000 --- a/src/BitrateVC.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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 diff --git a/src/BitrateVC.mm b/src/BitrateVC.mm deleted file mode 100644 index 2d9aa8251a9e85a765d7874a3163c691dfe02b1e..0000000000000000000000000000000000000000 --- a/src/BitrateVC.mm +++ /dev/null @@ -1,72 +0,0 @@ -/* - * 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 diff --git a/src/CurrentCallVC.mm b/src/CurrentCallVC.mm index 306590036a60cb3cf0152f6ef002f68dcedff43e..c4dc684ff0c775429ff37bd395383499eee7f605 100644 --- a/src/CurrentCallVC.mm +++ b/src/CurrentCallVC.mm @@ -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]; } diff --git a/ui/Base.lproj/CurrentCall.strings b/ui/Base.lproj/CurrentCall.strings index a7e86512cb620bb10f9392dd2525e0d9959e0108..b5c3790a86bf4ea91645994c95f3a03d7b3ea081 100644 --- a/ui/Base.lproj/CurrentCall.strings +++ b/ui/Base.lproj/CurrentCall.strings @@ -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"; diff --git a/ui/Base.lproj/CurrentCall.xib b/ui/Base.lproj/CurrentCall.xib index 2c7966b83f5eaabab84bd957d17c90be0848d588..5560aa896cdc9d1a1657dfa2d83cd1dbada6762a 100644 --- a/ui/Base.lproj/CurrentCall.xib +++ b/ui/Base.lproj/CurrentCall.xib @@ -19,8 +19,6 @@ <outlet property="personLabel" destination="bg3-hB-nE8" id="t6l-1B-JxI"/> <outlet property="pickUpButton" destination="qgD-3D-nD5" id="mkD-IT-22E"/> <outlet property="previewView" destination="6y6-RH-qOp" id="1PY-sd-mh4"/> - <outlet property="qualityButton" destination="j52-5l-K3e" id="fHh-32-Q5k"/> - <outlet property="qualityPopOver" destination="DRa-ai-N1h" id="Cb1-1p-7bO"/> <outlet property="recordOnOffButton" destination="oRa-pS-HN2" id="N7C-wn-0le"/> <outlet property="splitView" destination="GIJ-gB-FZo" id="PM0-az-Q8X"/> <outlet property="stateLabel" destination="kFD-FB-vig" id="SSO-14-q2t"/> @@ -166,7 +164,7 @@ </connections> </button> <button horizontalHuggingPriority="750" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="oRa-pS-HN2" customClass="IconButton"> - <rect key="frame" x="286" y="13" width="40" height="40"/> + <rect key="frame" x="247" y="13" width="40" height="40"/> <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="ic_action_record" imagePosition="overlaps" alignment="center" transparent="YES" imageScaling="proportionallyDown" id="rhz-4Z-avV"> <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/> <font key="font" size="10" name=".HelveticaNeueDeskInterface-Regular"/> @@ -281,7 +279,7 @@ </connections> </button> <button horizontalHuggingPriority="750" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ChW-kg-Sja" customClass="IconButton"> - <rect key="frame" x="336" y="12" width="40" height="40"/> + <rect key="frame" x="297" y="12" width="40" height="40"/> <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="ic_action_transfer" imagePosition="overlaps" alignment="center" transparent="YES" imageScaling="proportionallyDown" id="FOs-Wt-c2R"> <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/> <font key="font" size="10" name=".HelveticaNeueDeskInterface-Regular"/> @@ -301,36 +299,6 @@ <action selector="toggleTransferView:" target="-2" id="Gxt-lS-qZs"/> </connections> </button> - <button wantsLayer="YES" horizontalHuggingPriority="750" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="j52-5l-K3e" userLabel="Quality" customClass="IconButton"> - <rect key="frame" x="242" y="14" width="40" height="40"/> - <backgroundFilters> - <ciFilter name="CIColorMonochrome"> - <configuration> - <ciColor key="inputColor" red="1" green="0.53908979892730713" blue="0.15185309946537018" alpha="1"/> - <null key="inputImage"/> - <real key="inputIntensity" value="1"/> - </configuration> - </ciFilter> - </backgroundFilters> - <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="ic_action_quality" imagePosition="overlaps" alignment="center" transparent="YES" imageScaling="proportionallyUpOrDown" id="Vv0-lu-Pg9"> - <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/> - <font key="font" metaFont="system"/> - </buttonCell> - <userDefinedRuntimeAttributes> - <userDefinedRuntimeAttribute type="number" keyPath="imageInsets"> - <integer key="value" value="8"/> - </userDefinedRuntimeAttribute> - <userDefinedRuntimeAttribute type="color" keyPath="highlightColor"> - <color key="value" red="0.16862745100000001" green="0.70588235290000001" blue="0.78823529410000004" alpha="1" colorSpace="calibratedRGB"/> - </userDefinedRuntimeAttribute> - <userDefinedRuntimeAttribute type="color" keyPath="bgColor"> - <color key="value" red="0.16078431369999999" green="0.16078431369999999" blue="0.16078431369999999" alpha="0.80000000000000004" colorSpace="calibratedRGB"/> - </userDefinedRuntimeAttribute> - </userDefinedRuntimeAttributes> - <connections> - <action selector="displayQualityPopUp:" target="-2" id="EbO-ZD-Zsm"/> - </connections> - </button> </subviews> <constraints> <constraint firstItem="qgD-3D-nD5" firstAttribute="centerY" secondItem="Eoi-B8-iL6" secondAttribute="centerY" id="9NT-bT-9wJ"/> @@ -341,8 +309,8 @@ <constraint firstAttribute="height" constant="67" id="ynu-O5-MN8"/> </constraints> </customView> - <customView misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="JwW-2h-DyZ" customClass="ITProgressIndicator"> - <rect key="frame" x="287" y="204" width="100" height="100"/> + <customView translatesAutoresizingMaskIntoConstraints="NO" id="JwW-2h-DyZ" customClass="ITProgressIndicator"> + <rect key="frame" x="287" y="205" width="100" height="100"/> <constraints> <constraint firstAttribute="height" constant="100" id="gpl-re-hHE"/> <constraint firstAttribute="width" constant="100" id="nmo-HF-lhL"/> @@ -473,47 +441,6 @@ <outlet property="view" destination="TdD-3L-553" id="HQf-B1-D8b"/> </connections> </viewController> - <customView wantsLayer="YES" id="Y38-Id-LGC"> - <rect key="frame" x="0.0" y="0.0" width="56" height="161"/> - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> - <subviews> - <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="6lf-Ut-Xbr"> - <rect key="frame" x="13" y="134" width="31" height="27"/> - <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" title="+" id="b3D-0u-zMG"> - <font key="font" metaFont="system" size="22"/> - <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/> - <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> - </textFieldCell> - </textField> - <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="DRS-6A-7dl"> - <rect key="frame" x="13" y="0.0" width="31" height="27"/> - <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" title="-" id="gB4-S1-mny"> - <font key="font" metaFont="system" size="22"/> - <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/> - <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> - </textFieldCell> - </textField> - <slider horizontalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="CgZ-IK-49H"> - <rect key="frame" x="18" y="32" width="20" height="96"/> - <sliderCell key="cell" alignment="left" minValue="200" maxValue="3000" doubleValue="200" tickMarkPosition="right" sliderType="linear" id="oGE-FH-3jK"/> - <connections> - <action selector="valueChanged:" target="7rr-Wk-Nn8" id="Lir-12-n5c"/> - </connections> - </slider> - </subviews> - <point key="canvasLocation" x="772" y="-259.5"/> - </customView> - <viewController id="7rr-Wk-Nn8" customClass="BitrateVC"> - <connections> - <outlet property="bitrateSlider" destination="CgZ-IK-49H" id="NoD-8v-Cc1"/> - <outlet property="view" destination="Y38-Id-LGC" id="0cj-pV-MgQ"/> - </connections> - </viewController> - <popover behavior="t" id="DRa-ai-N1h"> - <connections> - <outlet property="contentViewController" destination="7rr-Wk-Nn8" id="43w-Ab-FTh"/> - </connections> - </popover> <customView id="vW1-8R-ebu"> <rect key="frame" x="0.0" y="0.0" width="719" height="497"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> @@ -565,7 +492,6 @@ <image name="ic_action_hold" width="72" height="72"/> <image name="ic_action_mute_audio" width="72" height="72"/> <image name="ic_action_mute_video" width="72" height="72"/> - <image name="ic_action_quality" width="72" height="72"/> <image name="ic_action_record" width="54" height="54"/> <image name="ic_action_transfer" width="72" height="72"/> <image name="ic_person_add" width="48" height="48"/> diff --git a/ui/Base.lproj/VideoPrefs.strings b/ui/Base.lproj/VideoPrefs.strings index 0f677bd200801c50da4809b7e9d715762f9195f1..95d97aa7ce503572ececfb2127702e9064abd10d 100644 --- a/ui/Base.lproj/VideoPrefs.strings +++ b/ui/Base.lproj/VideoPrefs.strings @@ -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";