less messy dialogue constructor

This commit is contained in:
Lynne Megido 2020-09-05 13:54:25 +10:00
parent 106d4d0ed8
commit 4544acd01e
Signed by: lynnesbian
GPG Key ID: F0A184B5213D9F90

View File

@ -316,14 +316,20 @@ namespace Buypeeb {
md.KeepAbove = true;
md.Resizable = false;
md.FocusOnMap = true;
md.Title = "buypeeb";
md.Title = "Buypeeb";
return md;
}
// show a simple entry dialogue that allows the user to enter text and either cancel or submit it
private (Boolean accepted, string response) EntryDialogue(string title = "Buypeeb", string message = "Hi there!", string prefill = null) {
Dialog ed = new Dialog(title, null, DialogFlags.DestroyWithParent | DialogFlags.Modal, "Cancel", ResponseType.Cancel, "OK", ResponseType.Ok);
Dialog ed = new Dialog(
title: title,
parent: this,
flags: DialogFlags.DestroyWithParent | DialogFlags.Modal,
/* button_data: */ "Cancel", ResponseType.Cancel, "OK", ResponseType.Ok
);
ed.DefaultResponse = ResponseType.Ok;
ed.KeepAbove = true;