Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Update FileFilter to GtkFileFilter and correct filter spacing (#366)
Browse files Browse the repository at this point in the history
  • Loading branch information
jordancluts authored and tknopp committed Aug 23, 2018
1 parent 1e1b809 commit 03d3446
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/src/manual/filedialogs.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ You can specify multiple match types for a single filter by separating the patte
You can alternatively specify MIME types, or if no specification is provided it defaults to types supported by `GdkPixbuf`.
The generic specification of a filter is
```julia
FileFilter(; name = nothing, pattern = "", mimetype = "")
GtkFileFilter(; name = nothing, pattern = "", mimetype = "")
```

If on the other hand you want to choose a folder instead of a file, set the `action` to `GtkFileChooserAction.SELECT_FOLDER`:
Expand All @@ -38,12 +38,12 @@ Here are some examples:
open_dialog("Pick a file")
open_dialog("Pick some files", select_multiple=true)
open_dialog("Pick a file", Null(), ("*.jl",))
open_dialog("Pick some text files", GtkNullContainer(), ("*.txt,*.csv",), select_multiple=true)
open_dialog("Pick a file", Null(), (FileFilter(mimetype="text/csv"),))
open_dialog("Pick an image file", GtkNullContainer(), ("*.png", "*.jpg", FileFilter("*.png,*.jpg", name="All supported formats")))
open_dialog("Pick an image file", GtkNullContainer(), (FileFilter(name="Supported image formats"),))
open_dialog("Pick some text files", GtkNullContainer(), ("*.txt, *.csv",), select_multiple=true)
open_dialog("Pick a file", Null(), (GtkFileFilter(mimetype="text/csv"),))
open_dialog("Pick an image file", GtkNullContainer(), ("*.png", "*.jpg", GtkFileFilter("*.png, *.jpg", name="All supported formats")))
open_dialog("Pick an image file", GtkNullContainer(), (GtkFileFilter(name="Supported image formats"),))

save_dialog("Save as...", Null(), (FileFilter("*.png,*.jpg", name="All supported formats"), "*.png", "*.jpg"))
save_dialog("Save as...", Null(), (GtkFileFilter("*.png, *.jpg", name="All supported formats"), "*.png", "*.jpg"))
```


Expand Down

0 comments on commit 03d3446

Please sign in to comment.