Skip to content

Commit 44bbd78

Browse files
committed
Fix missing window title
1 parent e914607 commit 44bbd78

7 files changed

Lines changed: 51 additions & 21 deletions

File tree

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ![Alt text](img/icons/64x64.png "Simple DNSCrypt") Simple DNSCrypt
22

3-
[![license](https://img.shields.io/github/license/bitbeans/SimpleDnsCrypt.svg?style=flat-square)](https://github.com/bitbeans/SimpleDnsCrypt/blob/master/LICENSE.md) [![Github All Releases](https://img.shields.io/github/release/bitbeans/SimpleDnsCrypt.svg?style=flat-square)](https://github.com/bitbeans/SimpleDnsCrypt/releases/latest) [![Github All Releases](https://img.shields.io/github/downloads/bitbeans/SimpleDnsCrypt/total.svg?style=flat-square)](https://github.com/bitbeans/SimpleDnsCrypt/releases/latest) [![donate PayPal](https://img.shields.io/badge/donate-PayPal-green.svg?style=flat-square)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=c.hermann@bitbeans.de&item_name=Donation+to+the+Simple+DNSCrypt+project) [![donate pledgie](https://img.shields.io/badge/donate-pledgie-green.svg?style=flat-square)](https://pledgie.com/campaigns/32588)
3+
[![license](https://img.shields.io/github/license/bitbeans/SimpleDnsCrypt.svg?style=flat-square)](https://github.com/bitbeans/SimpleDnsCrypt/blob/master/LICENSE.md) [![Github All Releases](https://img.shields.io/github/release/bitbeans/SimpleDnsCrypt.svg?style=flat-square)](https://github.com/bitbeans/SimpleDnsCrypt/releases/latest) [![dnscrypt--proxy](https://img.shields.io/badge/dnscrypt--proxy-1.9.5-orange.svg?style=flat-square)](https://dnscrypt.org/) [![Github All Releases](https://img.shields.io/github/downloads/bitbeans/SimpleDnsCrypt/total.svg?style=flat-square)](https://github.com/bitbeans/SimpleDnsCrypt/releases/latest) [![donate PayPal](https://img.shields.io/badge/donate-PayPal-green.svg?style=flat-square)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=c.hermann@bitbeans.de&item_name=Donation+to+the+Simple+DNSCrypt+project) [![donate pledgie](https://img.shields.io/badge/donate-pledgie-green.svg?style=flat-square)](https://pledgie.com/campaigns/32588)
44

55
Simple DNSCrypt is a simple management tool to configure dnscrypt-proxy on windows based systems.
66

@@ -13,8 +13,6 @@ Missing features:
1313

1414
- IPv6 support - see [#1](https://github.com/bitbeans/SimpleDnsCrypt/issues/1)
1515

16-
dnscrypt-proxy version: **1.9.5**
17-
1816
# ![Alt text](img/icons/32x32.png "Installation") Installation
1917

2018
To install Simple DNSCrypt use the [latest MSI package](https://github.com/bitbeans/SimpleDnsCrypt/releases/download/0.4.2/SimpleDNSCrypt.msi).

SimpleDnsCrypt/Tools/VersionUtilities.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public static string PublishBuild
4141
}
4242
else
4343
{
44-
return ("(x32)");
44+
return ("(x86)");
4545
}
4646
}
4747
}

SimpleDnsCrypt/ViewModels/MainViewModel.cs

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,17 @@ public sealed class MainViewModel : Screen, IShell
3131
private readonly BindableCollection<LocalNetworkInterface> _localNetworkInterfaces =
3232
new BindableCollection<LocalNetworkInterface>();
3333

34+
public string WindowTitle
35+
{
36+
get { return _windowTitle; }
37+
set
38+
{
39+
_windowTitle = value;
40+
NotifyOfPropertyChange(() => WindowTitle);
41+
}
42+
}
43+
44+
private string _windowTitle;
3445
private readonly UserData _userData;
3546
private readonly IWindowManager _windowManager;
3647
private bool _actAsGlobalGateway;
@@ -109,11 +120,11 @@ private MainViewModel(IWindowManager windowManager, IEventAggregator eventAggreg
109120
}
110121
if (_userData.UseIpv6)
111122
{
112-
DisplayName = string.Format("{0} {1} {2}", Global.ApplicationName, VersionUtilities.PublishVersion, VersionUtilities.PublishBuild);
123+
WindowTitle = string.Format("{0} {1} {2}", Global.ApplicationName, VersionUtilities.PublishVersion, VersionUtilities.PublishBuild);
113124
}
114125
else
115126
{
116-
DisplayName = string.Format("{0} {1} {2} ({3})", Global.ApplicationName, VersionUtilities.PublishVersion, VersionUtilities.PublishBuild,
127+
WindowTitle = string.Format("{0} {1} {2} ({3})", Global.ApplicationName, VersionUtilities.PublishVersion, VersionUtilities.PublishBuild,
117128
LocalizationEx.GetUiString("global_ipv6_disabled", Thread.CurrentThread.CurrentCulture));
118129
}
119130

@@ -318,11 +329,11 @@ public Language SelectedLanguage
318329
_userData.SaveConfigurationFile();
319330
if (_userData.UseIpv6)
320331
{
321-
DisplayName = string.Format("{0} {1} {2}", Global.ApplicationName, VersionUtilities.PublishVersion, VersionUtilities.PublishBuild);
332+
WindowTitle = string.Format("{0} {1} {2}", Global.ApplicationName, VersionUtilities.PublishVersion, VersionUtilities.PublishBuild);
322333
}
323334
else
324335
{
325-
DisplayName = string.Format("{0} {1} {2} ({3})", Global.ApplicationName, VersionUtilities.PublishVersion, VersionUtilities.PublishBuild,
336+
WindowTitle = string.Format("{0} {1} {2} ({3})", Global.ApplicationName, VersionUtilities.PublishVersion, VersionUtilities.PublishBuild,
326337
LocalizationEx.GetUiString("global_ipv6_disabled", Thread.CurrentThread.CurrentCulture));
327338
}
328339
if (_actAsGlobalGateway)
@@ -597,7 +608,7 @@ private async void UpdateAsync()
597608
if (userResult != MessageBoxResult.Yes) return;
598609
var updateViewModel = new UpdateViewModel(update.Update)
599610
{
600-
DisplayName =
611+
WindowTitle =
601612
LocalizationEx.GetUiString("window_update_title", Thread.CurrentThread.CurrentCulture)
602613
};
603614
dynamic settings = new ExpandoObject();
@@ -1126,7 +1137,7 @@ public void OpenPluginManager()
11261137
{
11271138
var win = new PluginManagerViewModel
11281139
{
1129-
DisplayName = LocalizationEx.GetUiString("window_plugin_title", Thread.CurrentThread.CurrentCulture)
1140+
WindowTitle = LocalizationEx.GetUiString("window_plugin_title", Thread.CurrentThread.CurrentCulture)
11301141
};
11311142
win.SetPlugins(Plugins);
11321143
dynamic settings = new ExpandoObject();

SimpleDnsCrypt/ViewModels/PluginManagerViewModel.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public sealed class PluginManagerViewModel : Screen
2323
private bool _cachePlugin;
2424
private int _cachePluginTtl;
2525
private List<string> _plugins;
26+
private string _windowTitle;
2627

2728
/// <summary>
2829
/// PluginManagerViewModel constructor.
@@ -34,6 +35,16 @@ public PluginManagerViewModel()
3435
_cachePluginTtl = 60;
3536
}
3637

38+
public string WindowTitle
39+
{
40+
get { return _windowTitle; }
41+
set
42+
{
43+
_windowTitle = value;
44+
NotifyOfPropertyChange(() => WindowTitle);
45+
}
46+
}
47+
3748
/// <summary>
3849
/// List of plugins.
3950
/// </summary>

SimpleDnsCrypt/ViewModels/UpdateViewModel.cs

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,12 @@ public class UpdateViewModel : Screen
2626
private bool _isUpdatingSignature;
2727

2828
private string _signature;
29+
private string _windowTitle;
2930

30-
/// <summary>
31-
/// Xaml constructor.
32-
/// </summary>
33-
public UpdateViewModel()
31+
/// <summary>
32+
/// Xaml constructor.
33+
/// </summary>
34+
public UpdateViewModel()
3435
{
3536
}
3637

@@ -45,11 +46,20 @@ public UpdateViewModel(Update update)
4546
StartUpdateAsync(update);
4647
}
4748

48-
49-
/// <summary>
50-
/// The path of the downloaded and validated installer file.
51-
/// </summary>
52-
public string InstallerPath
49+
public string WindowTitle
50+
{
51+
get { return _windowTitle; }
52+
set
53+
{
54+
_windowTitle = value;
55+
NotifyOfPropertyChange(() => WindowTitle);
56+
}
57+
}
58+
59+
/// <summary>
60+
/// The path of the downloaded and validated installer file.
61+
/// </summary>
62+
public string InstallerPath
5363
{
5464
get { return _installerPath; }
5565
set

SimpleDnsCrypt/Windows/BaseDialogWindow.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
44
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
5-
Title="SimpleDnsCrypt" GlowBrush="{DynamicResource AccentColorBrush}" ShowInTaskbar="False" ShowIconOnTitleBar="False" WindowStartupLocation="CenterScreen" ShowMinButton="False" ShowMaxRestoreButton="False" ResizeMode="NoResize" TitleCaps="False">
5+
Title="{Binding WindowTitle}" GlowBrush="{DynamicResource AccentColorBrush}" ShowInTaskbar="False" ShowIconOnTitleBar="False" WindowStartupLocation="CenterScreen" ShowMinButton="False" ShowMaxRestoreButton="False" ResizeMode="NoResize" TitleCaps="False">
66
</controls:MetroWindow>

SimpleDnsCrypt/Windows/BaseWindow.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
55
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
66
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
7-
Title="SimpleDnsCrypt" MinWidth="800" Width="800" MinHeight="360" SizeToContent="WidthAndHeight"
7+
Title="{Binding WindowTitle}" MinWidth="800" Width="800" MinHeight="360" SizeToContent="WidthAndHeight"
88
GlowBrush="{DynamicResource AccentColorBrush}"
99
Icon="../Images/simplednscrypt.ico" ShowIconOnTitleBar="False"
1010
WindowStartupLocation="CenterScreen" TitleCaps="False" Topmost="False"

0 commit comments

Comments
 (0)