Browse Source

Open update checker link with default browser.

pull/216/head
lennylxx 10 years ago
parent
commit
2c480b73bb
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      shadowsocks-csharp/View/MenuViewController.cs

+ 6
- 2
shadowsocks-csharp/View/MenuViewController.cs View File

@@ -237,7 +237,7 @@ namespace Shadowsocks.View
void notifyIcon1_BalloonTipClicked(object sender, EventArgs e) void notifyIcon1_BalloonTipClicked(object sender, EventArgs e)
{ {
System.Diagnostics.Process.Start(updateChecker.LatestVersionURL);
Process.Start(GetDefaultBrowserPath(), updateChecker.LatestVersionURL);
_notifyIcon.BalloonTipClicked -= notifyIcon1_BalloonTipClicked; _notifyIcon.BalloonTipClicked -= notifyIcon1_BalloonTipClicked;
} }
@@ -330,7 +330,7 @@ namespace Shadowsocks.View
{ {
string userChoice = @"Software\Microsoft\Windows\Shell\Associations\UrlAssociations\https\UserChoice"; string userChoice = @"Software\Microsoft\Windows\Shell\Associations\UrlAssociations\https\UserChoice";
string commandPath = @"$BROWSER$\shell\open\command"; string commandPath = @"$BROWSER$\shell\open\command";
string browserPath = "";
string browserPath = null;
try try
{ {
// Read default browser path from userChoice Key // Read default browser path from userChoice Key
@@ -357,6 +357,10 @@ namespace Shadowsocks.View
Logging.LogUsefulException(e); Logging.LogUsefulException(e);
} }
if (browserPath == null)
{
browserPath = "iexplore.exe";
}
return browserPath; return browserPath;
} }


Loading…
Cancel
Save