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) if (show_help)
ShowHelp (p); ShowHelp (p);
string controller_name;
switch (SparkleShare.Platform) { switch (SparkleShare.Platform) {
case PlatformID.Unix: case PlatformID.Unix:
SetProcessName ("sparkleshare"); SetProcessName ("sparkleshare");
//Controller = new SparkleLinController (); controller_name = "Lin";
break; break;
case PlatformID.MacOSX: case PlatformID.MacOSX:
Controller = new SparkleMacController (); controller_name = "Mac";
break; break;
case PlatformID.Win32NT: case PlatformID.Win32NT:
//Controller = new SparkleWinController (); controller_name = "Win";
break;
default:
controller_name = "Lin";
break; break;
} }
if (Controller != null) { Controller = (SparkleController) Activator.CreateInstance (
Type.GetType ("SparkleShare.Sparkle" + controller_name + "Controller"));
if (Controller != null && !hide_ui) {
UI = new SparkleUI (); UI = new SparkleUI ();
UI.Run (); UI.Run ();