# Module k.u.dialogs

Part of kiwi.ui

No module docstring

Class | HIGAlertDialog | Undocumented
Class | BaseDialog | Undocumented
Function | messagedialog | Create and show a MessageDialog.
Function | _simple | Undocumented
Function | error | Undocumented
Function | info | Undocumented
Function | warning | Undocumented
Function | yesno | Undocumented
Function | open | Displays an open dialog.
Function | selectfolder | Displays a select folder dialog.
Function | ask_overwrite | Undocumented
Function | save | Displays a save dialog.
Function | password | Shows a password dialog and returns the password entered in the dialog
Function | _test | Undocumented

def messagedialog(dialog_type, short, long=None, parent=None, buttons=gtk.BUTTONS_OK, default=-1):
Create and show a MessageDialog.

Parameters

dialog_type

one of constants

- gtk.MESSAGE_INFO
- gtk.MESSAGE_WARNING
- gtk.MESSAGE_QUESTION
- gtk.MESSAGE_ERROR

| short | A header text to be inserted in the dialog.
| long | A long description of message.
| parent | The parent widget of this dialog (type: a gtk.Window subclass )

buttons

The button type that the dialog will be display, one of the constants:

- gtk.BUTTONS_NONE
- gtk.BUTTONS_OK
- gtk.BUTTONS_CLOSE
- gtk.BUTTONS_CANCEL
- gtk.BUTTONS_YES_NO
- gtk.BUTTONS_OK_CANCEL

or a tuple or 2-sized tuples representing label and response. If label is a stock-id a stock icon will be displayed.

| default | optional default response id

def _simple(type, short, long=None, parent=None, buttons=gtk.BUTTONS_OK, default=-1):
Undocumented
def error(short, long=None, parent=None, buttons=gtk.BUTTONS_OK, default=-1):
Undocumented
def info(short, long=None, parent=None, buttons=gtk.BUTTONS_OK, default=-1):
Undocumented
def warning(short, long=None, parent=None, buttons=gtk.BUTTONS_OK, default=-1):
Undocumented
def yesno(text, parent=None, default=gtk.RESPONSE_YES, buttons=gtk.BUTTONS_YES_NO):
Undocumented
def open(title='', parent=None, patterns=None, folder=None, filter=None):
Displays an open dialog.

Parameters | title | the title of the folder, defaults to 'Select folder'
| parent | parent gtk.Window or None
| patterns | a list of pattern strings ['*.py', '*.pl'] or None
| folder | initial folder or None
| filter | a filter to use or None, is incompatible with patterns

def selectfolder(title='', parent=None, folder=None):
Displays a select folder dialog.

Parameters | title | the title of the folder, defaults to 'Select folder'
| parent | parent gtk.Window or None
| folder | initial folder or None

def ask_overwrite(filename, parent=None):
Undocumented
def save(title='', parent=None, current_name='', folder=None):
Displays a save dialog.

def password(primary='', secondary='', parent=None):
Shows a password dialog and returns the password entered in the dialog

Parameters | primary | primary text
| secondary | secondary text
| parent | a gtk.Window subclass or None
Returns | the password or None if none specified (type: string or None )

def _test():
Undocumented