setup: Add cancel buttons to Linux and Mac too
This commit is contained in:
parent
d2cb17a4b3
commit
eeb52d3979
|
@ -106,7 +106,13 @@ namespace SparkleShare {
|
|||
|
||||
VBox wrapper = new VBox (false, 9);
|
||||
wrapper.PackStart (table, true, false, 0);
|
||||
|
||||
Button cancel_button = new Button (_("Cancel"));
|
||||
|
||||
cancel_button.Clicked += delegate {
|
||||
Controller.SetupPageCancelled ();
|
||||
};
|
||||
|
||||
Button continue_button = new Button (_("Continue")) {
|
||||
Sensitive = false
|
||||
};
|
||||
|
@ -117,7 +123,8 @@ namespace SparkleShare {
|
|||
|
||||
Controller.SetupPageCompleted (full_name, email);
|
||||
};
|
||||
|
||||
|
||||
AddButton (cancel_button);
|
||||
AddButton (continue_button);
|
||||
Add (wrapper);
|
||||
|
||||
|
@ -472,7 +479,12 @@ namespace SparkleShare {
|
|||
|
||||
points.PackStart (new Label (""), true, true, 0);
|
||||
|
||||
Button cancel_button = new Button (_("Cancel"));
|
||||
|
||||
cancel_button.Clicked += delegate {
|
||||
Controller.PageCancelled ();
|
||||
};
|
||||
|
||||
Button try_again_button = new Button (_("Try Again…")) {
|
||||
Sensitive = true
|
||||
};
|
||||
|
@ -480,7 +492,8 @@ namespace SparkleShare {
|
|||
try_again_button.Clicked += delegate {
|
||||
Controller.ErrorPageCompleted ();
|
||||
};
|
||||
|
||||
|
||||
AddButton (cancel_button);
|
||||
AddButton (try_again_button);
|
||||
Add (points);
|
||||
|
||||
|
|
|
@ -298,7 +298,7 @@ namespace SparkleShare {
|
|||
};
|
||||
|
||||
this.quit_item.Activated += delegate {
|
||||
Program.Controller.Quit ();
|
||||
Controller.QuitClicked ();
|
||||
};
|
||||
|
||||
this.menu.Add (this.quit_item);
|
||||
|
|
|
@ -150,6 +150,15 @@ namespace SparkleShare {
|
|||
|
||||
Controller.SetupPageCompleted (full_name, email);
|
||||
};
|
||||
|
||||
CancelButton = new NSButton () {
|
||||
Title = "Cancel"
|
||||
};
|
||||
|
||||
CancelButton.Activated += delegate {
|
||||
Controller.SetupPageCancelled ();
|
||||
};
|
||||
|
||||
|
||||
Controller.UpdateSetupContinueButtonEvent += delegate (bool button_enabled) {
|
||||
InvokeOnMainThread (delegate {
|
||||
|
@ -164,6 +173,7 @@ namespace SparkleShare {
|
|||
ContentView.AddSubview (EmailTextField);
|
||||
|
||||
Buttons.Add (ContinueButton);
|
||||
Buttons.Add (CancelButton);
|
||||
|
||||
Controller.CheckSetupPage (
|
||||
FullNameTextField.StringValue,
|
||||
|
@ -553,8 +563,17 @@ namespace SparkleShare {
|
|||
TryAgainButton.Activated += delegate {
|
||||
Controller.ErrorPageCompleted ();
|
||||
};
|
||||
|
||||
CancelButton = new NSButton () {
|
||||
Title = "Cancel"
|
||||
};
|
||||
|
||||
CancelButton.Activated += delegate {
|
||||
Controller.PageCancelled ();
|
||||
};
|
||||
|
||||
Buttons.Add (TryAgainButton);
|
||||
Buttons.Add (CancelButton);
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -302,7 +302,7 @@ namespace SparkleShare {
|
|||
};
|
||||
|
||||
QuitMenuItem.Activated += delegate {
|
||||
Program.Controller.Quit ();
|
||||
Controller.QuitClicked ();
|
||||
};
|
||||
|
||||
Menu.AddItem (QuitMenuItem);
|
||||
|
|
Loading…
Reference in a new issue