Document util.browse_local options, remove an unused one.

This commit is contained in:
Cole Robinson 2009-06-22 14:24:09 -04:00
parent cd24a71013
commit f918e05d31
2 changed files with 12 additions and 4 deletions

View File

@ -399,7 +399,6 @@ class vmmCreatePool(gobject.GObject):
mode = gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER
return util.browse_local(self.topwin, dialog_name, dialog_type=mode,
start_folder=startfolder,
foldermode=foldermode)
start_folder=startfolder)
gobject.type_register(vmmCreatePool)

View File

@ -91,8 +91,17 @@ def xml_parse_wrapper(xml, parse_func, *args, **kwargs):
def browse_local(parent, dialog_name, start_folder=None, _type=None,
dialog_type=gtk.FILE_CHOOSER_ACTION_OPEN,
foldermode=False, confirm_func=None):
dialog_type=gtk.FILE_CHOOSER_ACTION_OPEN, confirm_func=None):
"""
Helper function for launching a filechooser
@param parent: Parent window for the filechooser
@param dialog_name: String to use in the title bar of the filechooser.
@param start_folder: Folder the filechooser is viewing at startup
@param _type: File extension to filter by (e.g. "iso", "png")
@param dialog_type: Maps to FileChooserDialog 'action'
@param confirm_func: Optional callback function if file is chosen.
"""
overwrite_confirm = False
choose_button = gtk.STOCK_OPEN