use switch statement for platform dependant stuff
This commit is contained in:
parent
38d7eed5c9
commit
8b6e719fd2
|
@ -89,19 +89,33 @@ namespace SparkleShare {
|
|||
|
||||
MenuItem OpenFolderItem = new MenuItem (_("Open SparkleShare Folder"));
|
||||
OpenFolderItem.Activated += delegate {
|
||||
Process Process = new Process ();
|
||||
Process Process = new Process ();
|
||||
switch (SparklePlatform.Name) {
|
||||
case "GNOME":
|
||||
Process.StartInfo.FileName = "xdg-open";
|
||||
Process.StartInfo.Arguments = SparklePaths.SparklePath;
|
||||
Process.Start();
|
||||
break;
|
||||
case "OSX":
|
||||
Process.StartInfo.FileName = "open";
|
||||
break;
|
||||
}
|
||||
Process.StartInfo.Arguments = SparklePaths.SparklePath;
|
||||
Process.Start();
|
||||
};
|
||||
Menu.Add (OpenFolderItem);
|
||||
|
||||
MenuItem AboutItem = new MenuItem (_("About SparkleShare"));
|
||||
AboutItem.Activated += delegate {
|
||||
Process Process = new Process ();
|
||||
Process Process = new Process ();
|
||||
switch (SparklePlatform.Name) {
|
||||
case "GNOME":
|
||||
Process.StartInfo.FileName = "xdg-open";
|
||||
Process.StartInfo.Arguments = "http://www.sparkleshare.org/";
|
||||
Process.Start();
|
||||
break;
|
||||
case "OSX":
|
||||
Process.StartInfo.FileName = "open";
|
||||
break;
|
||||
}
|
||||
Process.StartInfo.Arguments = "http://www.sparkleshare.org/";
|
||||
Process.Start ();
|
||||
};
|
||||
Menu.Add (AboutItem);
|
||||
|
||||
|
@ -133,8 +147,9 @@ namespace SparkleShare {
|
|||
|
||||
// Quits the program
|
||||
public void Quit (object o, EventArgs args) {
|
||||
System.IO.File.Delete (SparkleHelpers.CombineMore (SparklePaths.SparkleTmpPath +
|
||||
"sparkleshare.pid"));
|
||||
System.IO.File.Delete
|
||||
(SparkleHelpers.CombineMore (SparklePaths.SparkleTmpPath +
|
||||
"sparkleshare.pid"));
|
||||
Application.Quit ();
|
||||
}
|
||||
|
||||
|
|
|
@ -186,7 +186,7 @@ namespace SparkleShare {
|
|||
LogView.AppendColumn ("", TextCellRight, "text", 3);
|
||||
|
||||
TreeViewColumn [] Columns = LogView.Columns;
|
||||
Columns [0].MinWidth = 32;
|
||||
Columns [0].MinWidth = 28;
|
||||
Columns [1].Expand = true;
|
||||
Columns [2].Expand = true;
|
||||
Columns [1].MinWidth = 300;
|
||||
|
@ -275,11 +275,16 @@ namespace SparkleShare {
|
|||
// Compose an e-mail when an item is activated
|
||||
PeopleView.ItemActivated +=
|
||||
delegate (object o, ItemActivatedArgs Args) {
|
||||
if (SparklePlatform.Name.Equals ("GNOME")) {
|
||||
Process.StartInfo.FileName = "xdg-open";
|
||||
Process.StartInfo.Arguments = "mailto:" + SelectedEmail;
|
||||
Process.Start ();
|
||||
switch (SparklePlatform.Name) {
|
||||
case "GNOME":
|
||||
Process.StartInfo.FileName = "xdg-open";
|
||||
break;
|
||||
case "OSX":
|
||||
Process.StartInfo.FileName = "open";
|
||||
break;
|
||||
}
|
||||
Process.StartInfo.Arguments = "mailto:" + SelectedEmail;
|
||||
Process.Start ();
|
||||
};
|
||||
|
||||
// Select the person matching with the committer event list
|
||||
|
|
Loading…
Reference in a new issue