Merge branch 'Sharuru'

This commit is contained in:
clowwindy
2015-01-21 16:40:06 +08:00
3 changed files with 11 additions and 1 deletions
@@ -68,6 +68,11 @@ namespace Shadowsocks.Controller
return _config.GetCurrentServer();
}
public bool GetCurrentMode()
{
return _config.global;
}
// always return copy
public Configuration GetConfiguration()
{
@@ -32,6 +32,11 @@ namespace Shadowsocks.Model
}
}
public bool GetCurrentMode()
{
return global;
}
public static void CheckServer(Server server)
{
CheckPort(server.server_port);
@@ -114,7 +114,7 @@ namespace Shadowsocks.View
}
_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));
}