check adddialog entry fields kinda

This commit is contained in:
Hylke Bons 2010-05-12 10:47:00 +01:00
parent 17570f4d23
commit 161fcd1ec3
2 changed files with 16 additions and 0 deletions

View file

@ -96,6 +96,10 @@ namespace SparkleShare {
IconLookupFlags.GenericFallback);
}
public static bool IsGitUrl (string Url) {
return false;
}
}
}

View file

@ -468,6 +468,8 @@ namespace SparkleShare {
RemoteUrlExample.SetAlignment (0, 0);
RemoteUrlLabel.Xalign = 1;
// NameEntry.Text;
HButtonBox ButtonBox = new HButtonBox ();
ButtonBox.Layout = ButtonBoxStyle.End;
ButtonBox.Spacing = 6;
@ -480,7 +482,17 @@ namespace SparkleShare {
AddDialog.Destroy ();
};
AddButton.State = StateType.Insensitive;
AddButton.Clicked += delegate {
RemoteUrlCombo.Entry.Changed += delegate {
if (SparkleHelpers.IsGitUrl (RemoteUrlCombo.Entry.Text))
AddButton.State = StateType.Normal;
};
RemoteUrlCombo.Entry.Changed += delegate {
if (RemoteUrlCombo.Entry.Text.Length > 0)
AddButton.State = StateType.Normal;
};
AddDialog.Remove (AddDialog.Child);
VBox Box = new VBox (false, 24);