replaced outdated 'destroy's with 'dispose'

This commit is contained in:
Lynne Megido 2020-09-01 17:12:17 +10:00
parent 88f4adc02d
commit 1de93e8dd0

View file

@ -64,11 +64,9 @@ namespace Buypeeb {
ed.ContentArea.PackStart(edEntry, true, true, 10);
edEntry.Show();
// TODO: pressing enter should submit the form
ResponseType accepted = (ResponseType)ed.Run();
string response = edEntry.Text;
ed.Destroy();
ed.Dispose();
return (accepted == ResponseType.Ok, response);
}
@ -99,7 +97,7 @@ namespace Buypeeb {
private void ButtonQuitClicked(object sender, EventArgs a) {
MessageDialog md = new MessageDialog(null, DialogFlags.DestroyWithParent, MessageType.Question, ButtonsType.OkCancel, "Are you sure you want to quit?");
ResponseType response = (ResponseType)md.Run();
md.Destroy();
md.Dispose();
if (response == ResponseType.Ok) {
Application.Quit();
}