Commit 1b44370f authored by Margaux Clerc's avatar Margaux Clerc

Fix settings

parent eb8753be
......@@ -134,7 +134,7 @@
<data name="CancelChanges" xml:space="preserve">
<value>Cancel</value>
</data>
<data name="DebugSetting.Text" xml:space="preserve">
<data name="DebugSetting.Header" xml:space="preserve">
<value>Enable debug logs</value>
</data>
<data name="DeleteAllMenu" xml:space="preserve">
......@@ -198,7 +198,7 @@ and cc-by-nd from https://github.com/Templarian/WindowsIcons</value>
<data name="PCMUCodec.Header" xml:space="preserve">
<value>PCMU</value>
</data>
<data name="SILK16Codec" xml:space="preserve">
<data name="SILK16Codec.Header" xml:space="preserve">
<value>SILK 16</value>
</data>
<data name="Speex16Codec.Header" xml:space="preserve">
......@@ -237,16 +237,16 @@ and cc-by-nd from https://github.com/Templarian/WindowsIcons</value>
<data name="AdvancedSettingsMenu.Text" xml:space="preserve">
<value>Advanced settings</value>
</data>
<data name="CallMenu.Text" xml:space="preserve">
<data name="CallMenu.Header" xml:space="preserve">
<value>Call</value>
</data>
<data name="RFC2833Setting.Text" xml:space="preserve">
<data name="RFC2833Setting.Header" xml:space="preserve">
<value>Send DTMFs as RFC2833</value>
</data>
<data name="TunnelMenu" xml:space="preserve">
<value>Tunnel</value>
</data>
<data name="TunnelMode.Text" xml:space="preserve">
<data name="TunnelMode.Header" xml:space="preserve">
<value>Tunnel mode</value>
</data>
<data name="TunnelMode3GOnly" xml:space="preserve">
......@@ -267,7 +267,7 @@ and cc-by-nd from https://github.com/Templarian/WindowsIcons</value>
<data name="TunnelServer.Text" xml:space="preserve">
<value>Tunnel server</value>
</data>
<data name="NetworkMenu.Text" xml:space="preserve">
<data name="NetworkMenu.Header" xml:space="preserve">
<value>Network</value>
</data>
<data name="AccountMenu.Text" xml:space="preserve">
......@@ -345,16 +345,16 @@ and cc-by-nd from https://github.com/Templarian/WindowsIcons</value>
<data name="StatUploadBandwidth" xml:space="preserve">
<value>Upload bandwidth:</value>
</data>
<data name="SIPInfoSetting.Text" xml:space="preserve">
<data name="SIPInfoSetting.Header" xml:space="preserve">
<value>Send DTMFs as SIP INFO</value>
</data>
<data name="EchoCancellerCalibration" xml:space="preserve">
<data name="EchoCancellerCalibration.Content" xml:space="preserve">
<value>Echo canceller calibration</value>
</data>
<data name="CodecsMenu.Header" xml:space="preserve">
<value>Codecs</value>
</data>
<data name="OptionsMenu" xml:space="preserve">
<data name="OptionsMenu.Header" xml:space="preserve">
<value>Options</value>
</data>
<data name="ECCalibrationDone" xml:space="preserve">
......@@ -369,7 +369,7 @@ and cc-by-nd from https://github.com/Templarian/WindowsIcons</value>
<data name="ECCalibrationInProgress" xml:space="preserve">
<value>Calibration in progress</value>
</data>
<data name="ECCalibrationNotRun" xml:space="preserve">
<data name="ECCalibrationNotRun.Content" xml:space="preserve">
<value>Click button to calibrate</value>
</data>
<data name="H264Codec.Header" xml:space="preserve">
......@@ -402,7 +402,7 @@ and cc-by-nd from https://github.com/Templarian/WindowsIcons</value>
<data name="VideoActivationPopupContent" xml:space="preserve">
<value>You have been proposed video, would you like to accept it?</value>
</data>
<data name="ChatMenu.Text" xml:space="preserve">
<data name="ChatMenu.Header" xml:space="preserve">
<value>Chat</value>
</data>
<data name="Conversations.Text" xml:space="preserve">
......@@ -471,7 +471,7 @@ and cc-by-nd from https://github.com/Templarian/WindowsIcons</value>
<data name="DisplayName.Text" xml:space="preserve">
<value>Display name (not mandatory)</value>
</data>
<data name="VibratorSetting.Text" xml:space="preserve">
<data name="VibratorSetting.Header" xml:space="preserve">
<value>Vibrate on incoming message</value>
</data>
<data name="FileSaving" xml:space="preserve">
......@@ -504,7 +504,7 @@ and cc-by-nd from https://github.com/Templarian/WindowsIcons</value>
<data name="LinphoneLogin" xml:space="preserve">
<value>use linphone.org account</value>
</data>
<data name="ResizeSetting.Text" xml:space="preserve">
<data name="ResizeSetting.Header" xml:space="preserve">
<value>Scale down sent pictures</value>
</data>
<data name="ReportCrash" xml:space="preserve">
......@@ -547,13 +547,13 @@ Do you want to report it to the developpers ? It will help fix it faster.</value
<data name="FirewallPolicyNone" xml:space="preserve">
<value>None</value>
</data>
<data name="FirewallPolicySetting.Text" xml:space="preserve">
<data name="FirewallPolicySetting.Header" xml:space="preserve">
<value>Firewall policy</value>
</data>
<data name="FirewallPolicyStun" xml:space="preserve">
<value>STUN</value>
</data>
<data name="StunServer.Text" xml:space="preserve">
<data name="StunServer.Header" xml:space="preserve">
<value>Stun server</value>
</data>
<data name="OpusCodec.Header" xml:space="preserve">
......@@ -568,7 +568,7 @@ Do you want to report it to the developpers ? It will help fix it faster.</value
<data name="DisconnectMenu" xml:space="preserve">
<value>Disable register</value>
</data>
<data name="DebugMenu.Text" xml:space="preserve">
<data name="DebugMenu.Header" xml:space="preserve">
<value>Debug</value>
</data>
<data name="TCPRemote" xml:space="preserve">
......@@ -587,7 +587,7 @@ Do you want to report it to the developpers ? It will help fix it faster.</value
<data name="MediaEncryptionNone" xml:space="preserve">
<value>None</value>
</data>
<data name="MediaEncryptionSetting.Text" xml:space="preserve">
<data name="MediaEncryptionSetting.Header" xml:space="preserve">
<value>Media encryption</value>
</data>
<data name="MediaEncryptionSRTP" xml:space="preserve">
......@@ -694,7 +694,7 @@ To enjoy the best experience with Linphone WP8, we recommend that you use the SI
<data name="CallErrorIOError" xml:space="preserve">
<value>Please ensure you are registered and/or you have an Internet access</value>
</data>
<data name="VP8Codec" xml:space="preserve">
<data name="VP8Codec.Header" xml:space="preserve">
<value>VP8</value>
</data>
<data name="AVPF.Header" xml:space="preserve">
......@@ -709,4 +709,7 @@ To enjoy the best experience with Linphone WP8, we recommend that you use the SI
<data name="VideoSettings.Title" xml:space="preserve">
<value>VIDEO SETTINGS</value>
</data>
<data name="AdvancedSettingsTitle.Title" xml:space="preserve">
<value>ADVENCED SETTINGS</value>
</data>
</root>
\ No newline at end of file
......@@ -5,54 +5,51 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:linphone="clr-namespace:Linphone"
Background="{ThemeResource AppBarBackgroundThemeBrush}"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
mc:Ignorable="d">
<!--LayoutRoot is the root grid where all page content is placed-->
<Grid x:Name="LayoutRoot">
<!--Pivot Control-->
<Pivot Name="AdvancedSettingsMenu">
<PivotItem Header="NetworkMenu">
<Pivot Name="AdvancedSettingsMenu" x:Uid="AdvancedSettingsTitle">
<PivotItem Header="NetworkMenu" x:Uid="NetworkMenu">
<ScrollViewer>
<StackPanel Orientation="Vertical">
<ComboBox
x:Name="mediaEncryption"
x:Uid="MediaEncryptionSetting"
Header="MediaEncryptionSetting">
</ComboBox>
<ComboBox
Margin="0,10,0,0"
x:Name="firewallPolicy"
x:Uid="FirewallPolicySetting"
Header="FirewallPolicySetting">
</ComboBox>
<StackPanel Orientation="Vertical">
<TextBlock
Style="{ThemeResource SubtitleTextBlockStyle}"
x:Uid="StunServer" />
<TextBox
x:Name="Stun"
Margin="0,10,0,0"
Header="StunServer"
IsEnabled="True"
IsReadOnly="False">
<TextBox.InputScope>
<InputScope>
<InputScope.Names>
<InputScopeName NameValue="Url" />
</InputScope.Names>
</InputScope>
</TextBox.InputScope>
</TextBox>
<TextBox
x:Name="Stun"
IsEnabled="True"
IsReadOnly="False">
<TextBox.InputScope>
<InputScope>
<InputScope.Names>
<InputScopeName NameValue="Url" />
</InputScope.Names>
</InputScope>
</TextBox.InputScope>
</TextBox>
</StackPanel>
<StackPanel x:Name="TunnelPanel" Orientation="Vertical">
<ComboBox
x:Name="tunnelMode"
x:Uid="TunnelMode"
Header="TunnelMode">
</ComboBox>
<TextBlock
Style="{ThemeResource SubtitleTextBlockStyle}"
x:Uid="TunnelServer" />
<TextBox
......@@ -69,7 +66,6 @@
</TextBox>
<TextBlock
Style="{ThemeResource SubtitleTextBlockStyle}"
x:Uid="TunnelPort" />
<TextBox
......@@ -90,38 +86,43 @@
</PivotItem>
<!--Pivot item Call-->
<PivotItem Header="CallMenu">
<PivotItem Header="CallMenu" x:Uid="CallMenu">
<StackPanel Orientation="Vertical">
<ToggleSwitch
x:Name="rfc2833"
x:Uid="RFC2833Setting"
Header="RFC2833Setting">
</ToggleSwitch>
<ToggleSwitch
x:Name="sipInfo"
x:Name="sipInfo"
x:Uid="SIPInfoSetting"
Header="SIPInfoSetting">
</ToggleSwitch>
</StackPanel>
</PivotItem>
<!--Pivot item Chat-->
<PivotItem Header="ChatMenu">
<PivotItem Header="ChatMenu" x:Uid="ChatMenu">
<StackPanel Orientation="Vertical">
<ToggleSwitch
x:Name="vibrator"
x:Name="vibrator"
x:Uid="VibratorSetting"
Header="VibratorSetting">
</ToggleSwitch>
<ToggleSwitch
x:Name="resizeDown"
x:Name="resizeDown"
x:Uid="ResizeSetting"
Header="ResizeSetting">
</ToggleSwitch>
</StackPanel>
</PivotItem>
<!--Pivot item Debug-->
<PivotItem Header="DebugMenu">
<PivotItem Header="DebugMenu" x:Uid="DebugMenu">
<StackPanel Orientation="Vertical">
<ToggleSwitch
x:Name="Debug"
x:Uid="DebugSetting"
Header="DebugSetting">
</ToggleSwitch>
......@@ -130,8 +131,8 @@
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Button x:Name="SendLogs" Grid.Row="0" Content="SendLogsEmail" Click="SendLogs_Click"/>
<Button x:Name="ResetLogs" Grid.Row="1" Content="ResetLogs" Click="ResetLogs_Click"/>
<Button x:Name="SendLogs" Margin="0,10,0,0" Grid.Row="0" Content="SendLogsEmail" x:Uid="SendLogsEmail" Click="SendLogs_Click"/>
<Button x:Name="ResetLogs" Margin="0,10,0,0" Grid.Row="1" Content="ResetLogs" x:Uid="ResetLogs" Click="ResetLogs_Click"/>
<StackPanel
x:Name="BugReportUploadPopup"
Grid.RowSpan="2"
......
......@@ -16,7 +16,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
using Linphone.Model;
using System;
using System.Windows;
using System.Collections.Generic;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Navigation;
......@@ -25,9 +24,7 @@ using Windows.UI.Xaml;
namespace Linphone.Views
{
/// <summary>
/// Page displaying advanced settings (such as Tunnel, DTMFs, ...)
/// </summary>
public partial class AdvancedSettings : Page
{
private CallSettingsManager _callSettings = new CallSettingsManager();
......@@ -36,9 +33,6 @@ namespace Linphone.Views
private ApplicationSettingsManager _settings = new ApplicationSettingsManager();
private bool saveSettingsOnLeave = true;
/// <summary>
/// Public constructor.
/// </summary>
public AdvancedSettings()
{
this.InitializeComponent();
......@@ -48,10 +42,10 @@ namespace Linphone.Views
_chatSettings.Load();
_settings.Load();
rfc2833.IsEnabled = (bool) _callSettings.SendDTFMsRFC2833;
sipInfo.IsEnabled = (bool) _callSettings.SendDTFMsSIPInfo;
vibrator.IsEnabled = (bool) _chatSettings.VibrateOnIncomingMessage;
resizeDown.IsEnabled = (bool) _chatSettings.ScaleDownSentPictures;
rfc2833.IsOn = (bool) _callSettings.SendDTFMsRFC2833;
sipInfo.IsOn = (bool) _callSettings.SendDTFMsSIPInfo;
vibrator.IsOn = (bool) _chatSettings.VibrateOnIncomingMessage;
resizeDown.IsOn = (bool) _chatSettings.ScaleDownSentPictures;
List<string> mediaEncryptions = new List<string>
{
......@@ -84,32 +78,36 @@ namespace Linphone.Views
tunnelPort.Text = _networkSettings.TunnelPort;
tunnelServer.Text = _networkSettings.TunnelServer;
//TunnelPanel.Visibility = LinphoneManager.Instance.Core.Tunnel && Customs.IsTunnelEnabled ? Visibility.Visible : Visibility.Collapsed; //Hidden properties for now
TunnelPanel.Visibility = LinphoneManager.Instance.Core.Tunnel != null ? Visibility.Visible : Visibility.Collapsed; //Hidden properties for now
Debug.IsEnabled = _settings.DebugEnabled;
Debug.IsOn = _settings.DebugEnabled;
SendLogs.IsEnabled = _settings.DebugEnabled;
ResetLogs.IsEnabled = _settings.DebugEnabled;
}
private void Save()
{
_callSettings.SendDTFMsRFC2833 = rfc2833.IsEnabled;
_callSettings.SendDTFMsSIPInfo = sipInfo.IsEnabled;
_callSettings.SendDTFMsRFC2833 = rfc2833.IsOn;
_callSettings.SendDTFMsSIPInfo = sipInfo.IsOn;
_callSettings.Save();
_networkSettings.MEncryption = mediaEncryption.SelectedItem.ToString();
_networkSettings.FWPolicy = firewallPolicy.SelectedItem.ToString();
_networkSettings.StunServer = Stun.Text;
_networkSettings.TunnelMode = tunnelMode.SelectedItem.ToString();
_networkSettings.TunnelServer = tunnelServer.Text;
_networkSettings.TunnelPort = tunnelPort.Text;
if(TunnelPanel.Visibility == Visibility.Visible)
{
_networkSettings.TunnelMode = tunnelMode.SelectedItem.ToString();
_networkSettings.TunnelServer = tunnelServer.Text;
_networkSettings.TunnelPort = tunnelPort.Text;
}
_networkSettings.Save();
_chatSettings.VibrateOnIncomingMessage = vibrator.IsEnabled;
_chatSettings.ScaleDownSentPictures = resizeDown.IsEnabled;
_chatSettings.VibrateOnIncomingMessage = vibrator.IsOn;
_chatSettings.ScaleDownSentPictures = resizeDown.IsOn;
_chatSettings.Save();
_settings.DebugEnabled = (bool)Debug.IsEnabled;
_settings.DebugEnabled = (bool)Debug.IsOn;
_settings.Save();
//LinphoneManager.Instance.ConfigureLogger();
......
......@@ -97,13 +97,14 @@
</PivotItem>
<!--Pivot item two-->
<PivotItem Header="OptionsMenu">
<PivotItem Header="OptionsMenu" x:Uid="OptionsMenu">
<StackPanel Orientation="Vertical">
<Button
Grid.Row="3"
x:Name="ECCalibratorButton"
Click="ECCalibratorButton_Click_1"
Margin="0,30,0,0"
x:Uid="EchoCancellerCalibration"
Content="EchoCancellerCalibration" />
<Button
Grid.Row="3"
......@@ -111,6 +112,7 @@
IsEnabled="False"
BorderThickness="0"
Margin="0,30,0,0"
x:Uid="ECCalibrationNotRun"
Content="ECCalibrationNotRun" />
</StackPanel>
</PivotItem>
......
......@@ -17,7 +17,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
using BelledonneCommunications.Linphone.Native;
using Linphone.Model;
using System;
using System.Diagnostics;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Navigation;
......@@ -116,9 +115,10 @@ namespace Linphone.Views
private void ECCalibratorButton_Click_1(object sender, RoutedEventArgs e)
{
//ECCalibratorButton.IsEnabled = false;
//ECCalibratorStatusButton.Content = AppResources.ECCalibrationInProgress;
//LinphoneManager.Instance.LinphoneCore.StartEchoCalibration();
var loader = new Windows.ApplicationModel.Resources.ResourceLoader();
ECCalibratorButton.IsEnabled = false;
ECCalibratorStatusButton.Content = loader.GetString("ECCalibrationInProgress");
//LinphoneManager.Instance.Core.StartEchoCalibration();
}
/// <summary>
......
......@@ -78,7 +78,7 @@
x:Uid="AdvancedSettingsMenuSubtitle"/>
</StackPanel>
<StackPanel Grid.Row="4" Orientation="Vertical" Tapped="LockScreenSettings_Click_1" Margin="0,12,0,0">
<StackPanel Visibility="Collapsed" Grid.Row="4" Orientation="Vertical" Tapped="LockScreenSettings_Click_1" Margin="0,12,0,0">
<TextBlock
Style="{ThemeResource ListItemHeaderStyle}"
HorizontalAlignment="Left"
......
......@@ -10,9 +10,9 @@
<Grid x:Name="LayoutRoot">
<Pivot Title="VideoSettingsMenu" x:Uid="VideoSettings">
<PivotItem Header="OptionsMenu">
<PivotItem Header="OptionsMenu" x:Uid="OptionsMenu">
<ScrollViewer x:Name="OptionsContentPanel">
<Grid Margin="12,0,12,0">
<Grid>
<StackPanel Orientation="Vertical">
<ToggleSwitch
x:Name="VideoEnabled"
......@@ -20,21 +20,25 @@
</ToggleSwitch>
<ComboBox
Margin="0,10,0,5"
x:Name="PreferredVideoSize"
x:Uid="PreferredVideoSizeSetting">
</ComboBox>
<ToggleSwitch
Margin="0,10,0,0"
x:Name="AutomaticallyInitiateVideo"
x:Uid="AutomaticallyInitiateVideoSetting">
</ToggleSwitch>
<ToggleSwitch
Margin="0,10,0,0"
x:Name="AutomaticallyAcceptVideo"
x:Uid="AutomaticallyAcceptVideoSetting">
</ToggleSwitch>
<ToggleSwitch
Margin="0,10,0,0"
x:Name="SelfViewEnabled"
x:Uid="SelfViewEnabledSetting">
</ToggleSwitch>
......@@ -44,7 +48,7 @@
</PivotItem>
<!--Pivot item two-->
<PivotItem Header="CodecsMenu">
<PivotItem Header="CodecsMenu" x:Uid="CodecsMenu">
<ScrollViewer>
<ScrollViewer.Content>
<Grid x:Name="CodecsContentPanel">
......@@ -56,14 +60,15 @@
<ToggleSwitch
Grid.Row="0"
x:Name="H264"
x:Uid="H264Codec"
Header="H264Codec">
</ToggleSwitch>
<ToggleSwitch
Grid.Row="1"
x:Name="VP8"
x:Uid="VP8Codec"
Header="VP8Codec">
</ToggleSwitch>
</Grid>
</ScrollViewer.Content>
</ScrollViewer>
......
......@@ -14,11 +14,9 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
using BelledonneCommunications.Linphone.Native;
using Linphone.Model;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Navigation;
......@@ -46,11 +44,6 @@ namespace Linphone.Views
AutomaticallyAcceptVideo.IsOn = (bool) _callSettings.AutomaticallyAcceptVideo;
SelfViewEnabled.IsOn = (bool) _callSettings.SelfViewEnabled;
foreach(VideoSize size in LinphoneManager.Instance.Core.SupportedVideoSizes)
{
Debug.WriteLine(size.Name);
}
List<string> videoSizes = new List<string>
{
"vga",
......
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