Skip to content

Commit

Permalink
Open links embedded in the releases notes to an external browser.
Browse files Browse the repository at this point in the history
  • Loading branch information
ashokgelal committed Mar 30, 2017
1 parent 4efa8d0 commit 3cfc585
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 3 deletions.
Binary file modified src/Magpie/Magpie.latest.nupkg
Binary file not shown.
4 changes: 2 additions & 2 deletions src/Magpie/Magpie/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("0.2.1.0")]
[assembly: AssemblyFileVersion("0.2.1.0")]
[assembly: AssemblyVersion("0.2.2.0")]
[assembly: AssemblyFileVersion("0.2.2.0")]
[assembly: InternalsVisibleTo("Magpie.Tests")]
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")]
2 changes: 1 addition & 1 deletion src/Magpie/Magpie/Resources/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ ul li {
margin: 0;
margin-bottom: 0.5em;
text-indent: 0;
font-size: 1.1em;
font-size: 1em;
}

pre {
Expand Down
1 change: 1 addition & 0 deletions src/Magpie/Magpie/Views/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@

<WebBrowser x:Name="ReleaseNotesBrowser"
Grid.Row="3"
Navigating="ReleaseNotesBrowser_OnNavigating"
Height="280"
VerticalAlignment="Stretch"
views:BrowserBehavior.Html="{Binding ReleaseNotes}" />
Expand Down
12 changes: 12 additions & 0 deletions src/Magpie/Magpie/Views/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ namespace MagpieUpdater.Views
public partial class MainWindow
{
private MainWindowViewModel _viewModel;
private bool _firstPageLoaded;
public static string CustomStylesFilename = "Resources/MagpieStyles.xaml";

internal MainWindowViewModel ViewModel
Expand Down Expand Up @@ -64,6 +65,17 @@ private void SkipThisVersion_OnClick(object sender, RoutedEventArgs e)
viewModel.SkipThisVersionCommand.Execute(null);
}
}

private void ReleaseNotesBrowser_OnNavigating(object sender, NavigatingCancelEventArgs e)
{
if (!_firstPageLoaded)
{
_firstPageLoaded = true;
return;
}
e.Cancel = true;
Process.Start(e.Uri.ToString());
}
}

internal class BrowserBehavior
Expand Down

0 comments on commit 3cfc585

Please sign in to comment.