Changeset 3246

Show
Ignore:
Timestamp:
07/12/07 17:32:49 (1 year ago)
Author:
paul
Message:

Applied [3242] (ticket #1029) to the stable branch (docstrings for ui.stop and friends).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/stable/dabo/ui/uiwx/dMessageBox.py

    r3054 r3246  
    3030def areYouSure(message="Are you sure?", title=None, defaultNo=False,  
    3131        cancelButton=True, parent=None): 
    32     """Display a message dialog asking the user to answer Yes, No to a question."""  
     32    """Display a dMessageBox asking the user to answer yes or no to a question. 
     33 
     34    Returns True, False, or None, for choices "Yes", "No", or "Cancel". 
     35 
     36    The default title comes from app.getAppInfo("appName"), or if the  
     37    application object isn't available it will be "Dabo Application". 
     38 
     39    If defaultNo is True, the 'No' button will be the default button. 
     40 
     41    If cancelButton is True (default), a third 'Cancel' button will appear. 
     42 
     43    If parent isn't passed, it will automatically resolve to the current  
     44    active form. 
     45    """  
    3346    if title is None: 
    3447        title = getDefaultTitle() 
     
    5265 
    5366def stop(message="Stop", title=None, parent=None): 
     67    """Display a dMessageBox informing the user that the operation cannot proceed. 
     68 
     69    Returns None. 
     70 
     71    The default title comes from app.getAppInfo("appName"), or if the  
     72    application object isn't available it will be "Dabo Application". 
     73 
     74    If parent isn't passed, it will automatically resolve to the current  
     75    active form. 
     76    """ 
    5477    if title is None: 
    5578        title = getDefaultTitle() 
     
    5881 
    5982def info(message="Information", title=None, parent=None): 
     83    """Display a dMessageBox offering the user some useful information. 
     84 
     85    Returns None. 
     86 
     87    The default title comes from app.getAppInfo("appName"), or if the  
     88    application object isn't available it will be "Dabo Application". 
     89 
     90    If parent isn't passed, it will automatically resolve to the current  
     91    active form. 
     92    """ 
    6093    if title is None: 
    6194        title = getDefaultTitle() 
     
    6497 
    6598def exclaim(message="Important!", title=None, parent=None): 
     99    """Display a dMessageBox urgently informing the user that we cannot proceed. 
     100 
     101    Returns None. 
     102 
     103    The default title comes from app.getAppInfo("appName"), or if the  
     104    application object isn't available it will be "Dabo Application". 
     105 
     106    If parent isn't passed, it will automatically resolve to the current  
     107    active form. 
     108    """ 
    66109    if title is None: 
    67110        title = getDefaultTitle() 
     
    73116    dlg = dMessageBox(message, title, style, parent=parent) 
    74117    dlg.CenterOnParent() 
    75     retval = dlg.ShowModal() 
    76     dlg.Destroy() 
    77     return None 
    78  
    79  
    80 def info(message="Information", title=None, parent=None): 
    81     if title is None: 
    82         title = getDefaultTitle() 
    83     style = wx.OK|wx.ICON_INFORMATION 
    84     dlg = dMessageBox(message, title, style, parent=parent) 
    85118    retval = dlg.ShowModal() 
    86119    dlg.Destroy()