diff --git a/SparkleLib/SparkleRepo.cs b/SparkleLib/SparkleRepo.cs index 9d1e0e99..10cac773 100644 --- a/SparkleLib/SparkleRepo.cs +++ b/SparkleLib/SparkleRepo.cs @@ -1012,15 +1012,18 @@ namespace SparkleLib { private string FormatCommitMessage () { - /// RepositoryStatus contains the following properties (all HashSet ) - /// * Added ---> added and staged - /// * MergeConflict ---> - /// * Missing ---> removed but not staged - /// * Modified ---> modified but not staged - /// * Removed ---> removed and staged - /// * Staged ---> modified and staged - /// * Untracked ---> added but not staged - /// Because we create the commit message, we only need to consider the staged changes + // RepositoryStatus contains the following properties (all HashSet ) + // + // * Added ---> added and staged + // * MergeConflict ---> + // * Missing ---> removed but not staged + // * Modified ---> modified but not staged + // * Removed ---> removed and staged + // * Staged ---> modified and staged + // * Untracked ---> added but not staged + // + // Because we create the commit message, we only need to consider the staged changes + RepositoryStatus status = Index.Status; string file_name = ""; diff --git a/SparkleShare/SparkleController.cs b/SparkleShare/SparkleController.cs index 5eb7fc70..59c9d22d 100644 --- a/SparkleShare/SparkleController.cs +++ b/SparkleShare/SparkleController.cs @@ -523,38 +523,7 @@ namespace SparkleShare { } - public void OpenSparkleShareFolder (string subfolder) - { - - Process process = new Process (); - process.StartInfo.Arguments = SparkleHelpers.CombineMore (SparklePaths.SparklePath, - subfolder).Replace (" ", "\\ "); // Escape space-characters - - string open_command_path = SparkleHelpers.CombineMore (Path.VolumeSeparatorChar.ToString (), - "usr", "bin"); - - if (File.Exists (Path.Combine (open_command_path, "xdg-open"))) { - - process.StartInfo.FileName = "xdg-open"; - - } else if (File.Exists (Path.Combine (open_command_path, "gnome-open"))) { - - process.StartInfo.FileName = "gnome-open"; - - } else if (File.Exists (Path.Combine (open_command_path, "open"))) { - - process.StartInfo.FileName = "open"; - - } else { - - return; - - } - - process.Start (); - - } - + public abstract void OpenSparkleShareFolder (string subfolder); // Adds the user's SparkleShare key to the ssh-agent, // so all activity is done with this key diff --git a/SparkleShare/SparkleLinController.cs b/SparkleShare/SparkleLinController.cs index 0f8c134f..ba26ecae 100644 --- a/SparkleShare/SparkleLinController.cs +++ b/SparkleShare/SparkleLinController.cs @@ -174,6 +174,25 @@ namespace SparkleShare { return false; } + + + public override void OpenSparkleShareFolder (string subfolder) + { + + string open_command_path = SparkleHelpers.CombineMore (Path.VolumeSeparatorChar.ToString (), + "usr", "bin", "xdg-open"); + + if (!File.Exists (open_command_path)) + return; + + string folder = SparkleHelpers.CombineMore (SparklePaths.SparklePath, subfolder); + + Process process = new Process (); + process.StartInfo.Arguments = folder.Replace (" ", "\\ "); // Escape space-characters + process.StartInfo.FileName = "xdg-open"; + process.Start (); + + } }