Skip to content

Commit

Permalink
Merge branch 'Sharuru'
Browse files Browse the repository at this point in the history
  • Loading branch information
clowwindy committed Jan 21, 2015
2 parents ce53273 + 7918cb4 commit b6f1def
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions shadowsocks-csharp/Controller/ShadowsocksController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ public Server GetCurrentServer()
return _config.GetCurrentServer();
}

public bool GetCurrentMode()
{
return _config.global;
}

// always return copy
public Configuration GetConfiguration()
{
Expand Down
5 changes: 5 additions & 0 deletions shadowsocks-csharp/Model/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ public Server GetCurrentServer()
}
}

public bool GetCurrentMode()
{
return global;
}

public static void CheckServer(Server server)
{
CheckPort(server.server_port);
Expand Down
2 changes: 1 addition & 1 deletion shadowsocks-csharp/View/MenuViewController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ private void UpdateTrayIcon()
}
_notifyIcon.Icon = Icon.FromHandle(icon.GetHicon());

string text = I18N.GetString("Shadowsocks") + " " + UpdateChecker.Version + "\n" + (enabled ? I18N.GetString("Enabled") : I18N.GetString("Disabled")) + "\n" + controller.GetCurrentServer().FriendlyName();
string text = I18N.GetString("Shadowsocks") + " " + UpdateChecker.Version + "\n" + (enabled ? I18N.GetString("Enabled") : I18N.GetString("Disabled")) + " " + (controller.GetCurrentMode() ? I18N.GetString("Global") : I18N.GetString("PAC")) + "\n" + controller.GetCurrentServer().FriendlyName();
_notifyIcon.Text = text.Substring(0, Math.Min(63, text.Length));
}

Expand Down

0 comments on commit b6f1def

Please sign in to comment.