Module view.FileDialog

Enhanced gtk.FileChooserDialog.

Functions

FileDialog.new (parent, title, action, filters) Constructor.
FileDialog:run (folder) Runs the dialog.
(private) FileDialog:add_filters (filters) Adds filters to the dialog.
(private) FileDialog:build_gui (parent, title, action) Builds the interface.


Functions

FileDialog.new (parent, title, action, filters)
Constructor.

Parameters

  • parent: Parent window
  • title: Title of the dialog
  • action: GtkFileChooserAction to use
  • filters: Table in the form {{id = 1, name = "Lua", ext = ".lua"}} (optional) (name must be unique, the id is returned to the user)

Return value:

New FileDialog instance
FileDialog:run (folder)
Runs the dialog.

Parameters

  • folder: The initial folder that the dialog should point (can be nil)

Return value:

The selected folder
(private) FileDialog:add_filters (filters)
Adds filters to the dialog.

Parameters

  • filters:
(private) FileDialog:build_gui (parent, title, action)
Builds the interface.

Parameters

  • parent: Parent window
  • title:
  • action:

Valid XHTML 1.0!