Commit 8574378a authored by Jack Jansen's avatar Jack Jansen

In AskYesNoCancel() treat the "yes" and "no" buttons the same way as the cancel

button (i.e. an empty label hides the button).
parent ad892dc8
......@@ -171,11 +171,17 @@ def AskYesNoCancel(question, default = 0, yes=None, no=None, cancel=None, id=262
h = d.GetDialogItemAsControl(5)
SetDialogItemText(h, lf2cr(question))
if yes != None:
h = d.GetDialogItemAsControl(2)
h.SetControlTitle(yes)
if yes == '':
d.HideDialogItem(2)
else:
h = d.GetDialogItemAsControl(2)
h.SetControlTitle(yes)
if no != None:
h = d.GetDialogItemAsControl(3)
h.SetControlTitle(no)
if no == '':
d.HideDialogItem(3)
else:
h = d.GetDialogItemAsControl(3)
h.SetControlTitle(no)
if cancel != None:
if cancel == '':
d.HideDialogItem(4)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment