setup: Add cancel buttons to Linux and Mac too
This commit is contained in:
parent
d2cb17a4b3
commit
eeb52d3979
|
@ -107,6 +107,12 @@ 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
|
||||
};
|
||||
|
@ -118,6 +124,7 @@ namespace SparkleShare {
|
|||
Controller.SetupPageCompleted (full_name, email);
|
||||
};
|
||||
|
||||
AddButton (cancel_button);
|
||||
AddButton (continue_button);
|
||||
Add (wrapper);
|
||||
|
||||
|
@ -472,6 +479,11 @@ 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
|
||||
|
@ -481,6 +493,7 @@ namespace SparkleShare {
|
|||
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);
|
||||
|
|
|
@ -151,6 +151,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 {
|
||||
ContinueButton.Enabled = button_enabled;
|
||||
|
@ -164,6 +173,7 @@ namespace SparkleShare {
|
|||
ContentView.AddSubview (EmailTextField);
|
||||
|
||||
Buttons.Add (ContinueButton);
|
||||
Buttons.Add (CancelButton);
|
||||
|
||||
Controller.CheckSetupPage (
|
||||
FullNameTextField.StringValue,
|
||||
|
@ -554,7 +564,16 @@ namespace SparkleShare {
|
|||
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