diff --git a/SparkleShare/SparkleDialog.cs b/SparkleShare/SparkleDialog.cs index 0afd6a58..408071e4 100644 --- a/SparkleShare/SparkleDialog.cs +++ b/SparkleShare/SparkleDialog.cs @@ -36,7 +36,7 @@ namespace SparkleShare { private ComboBoxEntry RemoteUrlCombo; private Table Table; - public SparkleDialog () : base ("") { + public SparkleDialog (string Url) : base ("") { BorderWidth = 6; IconName = "folder-sparkleshare"; @@ -50,6 +50,7 @@ namespace SparkleShare { Label RemoteUrlLabel = new Label (_("Address: ")); RemoteUrlCombo = new ComboBoxEntry (); + RemoteUrlCombo.Entry.Text = Url; ListStore Defaults = new ListStore (typeof (string), typeof (Gdk.Pixbuf)); @@ -157,6 +158,27 @@ namespace SparkleShare { if (Output.Contains ("fatal")) { Console.WriteLine ("SOMETHING WENT WRONG!!!"); + + SparkleBubble = + new SparkleBubble ("Something went wrong while syncing " + + " ‘" + RepoName + "’", + "Please double check your address and\n" + + "network connection."); + + SparkleBubble.AddAction ("", _("Try Again…"), + delegate { + Process.StartInfo.FileName = "xdg-open"; + Process.StartInfo.Arguments = + SparkleHelpers.CombineMore ( + SparklePaths.SparklePath, RepoName); + Process.Start(); + } ); + + SparkleDialog SparkleDialog = new SparkleDialog (RepoRemoteUrl); + SparkleDialog.ShowAll (); + + Destroy (); + } // Move the folder to the SparkleShare folder when done cloning diff --git a/SparkleShare/SparkleStatusIcon.cs b/SparkleShare/SparkleStatusIcon.cs index a67ee9a6..093f912e 100644 --- a/SparkleShare/SparkleStatusIcon.cs +++ b/SparkleShare/SparkleStatusIcon.cs @@ -84,7 +84,7 @@ namespace SparkleShare { MenuItem AddItem = new MenuItem (_("Add a Folder…")); AddItem.Activated += delegate { - SparkleDialog SparkleDialog = new SparkleDialog (); + SparkleDialog SparkleDialog = new SparkleDialog (""); SparkleDialog.ShowAll (); }; Menu.Add (AddItem); diff --git a/SparkleShare/SparkleUI.cs b/SparkleShare/SparkleUI.cs index 1197bb79..58857347 100644 --- a/SparkleShare/SparkleUI.cs +++ b/SparkleShare/SparkleUI.cs @@ -123,7 +123,7 @@ namespace SparkleShare { NoFoldersBubble.IconName = "folder-sparkleshare"; NoFoldersBubble.AddAction ("", "Add a Folder…", delegate { - SparkleDialog SparkleDialog = new SparkleDialog (); + SparkleDialog SparkleDialog = new SparkleDialog (""); SparkleDialog.ShowAll (); /* Process.StartInfo.FileName = "xdg-open"; Process.StartInfo.Arguments = SparklePaths.SparklePath;