Changeset 826:5c6ff27a9206 for src
- Timestamp:
- 09/25/16 07:58:30 (8 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/common.py
r823 r826 476 476 477 477 #------------------------------------------------------------------------------ 478 479 def askYesNo(question, parent = None, title = WINDOW_TITLE_BASE): 480 """Ask a Yes/No question. 481 482 Return a boolean indicating the answer.""" 483 dialog = gtk.MessageDialog(parent = parent, 484 type = MESSAGETYPE_QUESTION, 485 message_format = question) 486 487 dialog.add_button(xstr("button_no"), RESPONSETYPE_NO) 488 dialog.add_button(xstr("button_yes"), RESPONSETYPE_YES) 489 490 dialog.set_title(title) 491 result = dialog.run() 492 dialog.hide() 493 494 return result==RESPONSETYPE_YES 495 496 #------------------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.