From 4544acd01e2d8b714a6383c9283b608bed7a126d Mon Sep 17 00:00:00 2001 From: Lynne Date: Sat, 5 Sep 2020 13:54:25 +1000 Subject: [PATCH] less messy dialogue constructor --- MainWindow.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/MainWindow.cs b/MainWindow.cs index fb36ebf..7bf879e 100755 --- a/MainWindow.cs +++ b/MainWindow.cs @@ -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;