Move the final pieces of logic from [intro] to [controller]
This commit is contained in:
parent
faafe0dc93
commit
32ce3a7633
Binary file not shown.
Before Width: | Height: | Size: 186 B After Width: | Height: | Size: 216 B |
|
@ -421,12 +421,19 @@ namespace SparkleShare {
|
|||
|
||||
}
|
||||
|
||||
|
||||
public void OpenSparkleShareFolder ()
|
||||
{
|
||||
|
||||
OpenSparkleShareFolder ("");
|
||||
|
||||
}
|
||||
|
||||
public void OpenSparkleShareFolder (string subfolder)
|
||||
{
|
||||
|
||||
Process process = new Process ();
|
||||
process.StartInfo.Arguments = SparklePaths.SparklePath;
|
||||
process.StartInfo.Arguments = SparkleHelpers.CombineMore (SparklePaths.SparklePath,
|
||||
subfolder).Replace (" ", "\\ "); // Escape space-characters
|
||||
|
||||
string open_command_path = SparkleHelpers.CombineMore (Path.VolumeSeparatorChar.ToString (),
|
||||
"usr", "bin");
|
||||
|
@ -717,6 +724,8 @@ namespace SparkleShare {
|
|||
public void Quit ()
|
||||
{
|
||||
|
||||
// TODO: Pop up a warning when quitting whilst syncing
|
||||
|
||||
foreach (SparkleRepo repo in Repositories)
|
||||
repo.Dispose ();
|
||||
|
||||
|
|
|
@ -488,17 +488,9 @@ namespace SparkleShare {
|
|||
// A button that opens the synced folder
|
||||
Button open_folder_button = new Button (_("Open Folder"));
|
||||
|
||||
open_folder_button.Clicked += delegate (object o, EventArgs args) {
|
||||
open_folder_button.Clicked += delegate {
|
||||
|
||||
string path = SparkleHelpers.CombineMore (SparklePaths.SparklePath, folder_name);
|
||||
|
||||
Process process = new Process ();
|
||||
process.StartInfo.FileName = "xdg-open";
|
||||
process.StartInfo.Arguments = path.Replace (" ", "\\ "); // Escape space-characters
|
||||
process.Start ();
|
||||
|
||||
if (ServerFormOnly)
|
||||
Destroy ();
|
||||
SparkleShare.Controller.OpenSparkleShareFolder (folder_name);
|
||||
|
||||
};
|
||||
|
||||
|
@ -622,6 +614,8 @@ namespace SparkleShare {
|
|||
|
||||
finish_button.Clicked += delegate (object o, EventArgs args) {
|
||||
|
||||
// TODO: This can probably go away as we're
|
||||
// now always showing the status icon even without folders
|
||||
if (SparkleUI.StatusIcon == null)
|
||||
SparkleUI.StatusIcon = new SparkleStatusIcon ();
|
||||
else
|
||||
|
@ -708,7 +702,7 @@ namespace SparkleShare {
|
|||
}
|
||||
|
||||
|
||||
// Checks if a url is a valid git url
|
||||
// Checks if a url is a valid git url TODO: broken
|
||||
private static bool IsGitUrl (string url)
|
||||
{
|
||||
|
||||
|
|
Loading…
Reference in a new issue