fill in default repo url when possible

This commit is contained in:
Hylke Bons 2010-05-27 11:22:19 +02:00
parent 33331fe998
commit 9c12af4b19
3 changed files with 25 additions and 3 deletions

View file

@ -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

View file

@ -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);

View file

@ -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;