summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2000-02-10 16:15:53 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2000-02-10 16:15:53 (GMT)
commit8574378ad48cbae4589645774fdee8f141e0b823 (patch)
treee3ae9bc42acf577de8ebd39b1716527fabfc67f3 /Mac
parentad892dc80d2d42337c12499e679e53f627244abf (diff)
downloadcpython-8574378ad48cbae4589645774fdee8f141e0b823.zip
cpython-8574378ad48cbae4589645774fdee8f141e0b823.tar.gz
cpython-8574378ad48cbae4589645774fdee8f141e0b823.tar.bz2
In AskYesNoCancel() treat the "yes" and "no" buttons the same way as the cancel
button (i.e. an empty label hides the button).
Diffstat (limited to 'Mac')
-rw-r--r--Mac/Lib/EasyDialogs.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/Mac/Lib/EasyDialogs.py b/Mac/Lib/EasyDialogs.py
index 44ac2b8..1327243 100644
--- a/Mac/Lib/EasyDialogs.py
+++ b/Mac/Lib/EasyDialogs.py
@@ -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)