mirror of https://github.com/python/cpython
In AskYesNoCancel() treat the "yes" and "no" buttons the same way as the cancel
button (i.e. an empty label hides the button).
This commit is contained in:
parent
ad892dc80d
commit
8574378ad4
|
@ -171,9 +171,15 @@ def AskYesNoCancel(question, default = 0, yes=None, no=None, cancel=None, id=262
|
|||
h = d.GetDialogItemAsControl(5)
|
||||
SetDialogItemText(h, lf2cr(question))
|
||||
if yes != None:
|
||||
if yes == '':
|
||||
d.HideDialogItem(2)
|
||||
else:
|
||||
h = d.GetDialogItemAsControl(2)
|
||||
h.SetControlTitle(yes)
|
||||
if no != None:
|
||||
if no == '':
|
||||
d.HideDialogItem(3)
|
||||
else:
|
||||
h = d.GetDialogItemAsControl(3)
|
||||
h.SetControlTitle(no)
|
||||
if cancel != None:
|
||||
|
|
Loading…
Reference in New Issue