Fix OS detection for controller

This commit is contained in:
Hylke Bons 2011-03-03 15:36:50 +00:00
parent ac36a5cabc
commit 70d15e31fb

View file

@ -83,27 +83,36 @@ namespace SparkleShare {
if (show_help)
ShowHelp (p);
string controller_name;
switch (SparkleShare.Platform) {
case PlatformID.Unix:
SetProcessName ("sparkleshare");
//Controller = new SparkleLinController ();
controller_name = "Lin";
break;
case PlatformID.MacOSX:
Controller = new SparkleMacController ();
controller_name = "Mac";
break;
case PlatformID.Win32NT:
//Controller = new SparkleWinController ();
controller_name = "Win";
break;
default:
controller_name = "Lin";
break;
}
if (Controller != null) {
Controller = (SparkleController) Activator.CreateInstance (
Type.GetType ("SparkleShare.Sparkle" + controller_name + "Controller"));
if (Controller != null && !hide_ui) {
UI = new SparkleUI ();
UI.Run ();