Fix OS detection for controller
This commit is contained in:
parent
5a055597d5
commit
49e2ab6e86
|
@ -85,25 +85,34 @@ namespace SparkleShare {
|
||||||
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 ();
|
||||||
|
|
Loading…
Reference in a new issue