parent
8e14ac6d71
commit
8e9e05615c
|
@ -152,12 +152,11 @@ public class Dialog : Gtk.Dialog {
|
||||||
private void show_select_avatar() {
|
private void show_select_avatar() {
|
||||||
PreviewFileChooserNative chooser = new PreviewFileChooserNative(_("Select avatar"), this, FileChooserAction.OPEN, _("Select"), _("Cancel"));
|
PreviewFileChooserNative chooser = new PreviewFileChooserNative(_("Select avatar"), this, FileChooserAction.OPEN, _("Select"), _("Cancel"));
|
||||||
FileFilter filter = new FileFilter();
|
FileFilter filter = new FileFilter();
|
||||||
filter.add_pattern("*.png");
|
foreach (PixbufFormat pixbuf_format in Pixbuf.get_formats()) {
|
||||||
filter.add_pattern("*.jpg");
|
foreach (string mime_type in pixbuf_format.get_mime_types()) {
|
||||||
filter.add_pattern("*.jpeg");
|
filter.add_mime_type(mime_type);
|
||||||
filter.add_pattern("*.gif");
|
}
|
||||||
filter.add_pattern("*.svg");
|
}
|
||||||
filter.add_pattern("*.bmp");
|
|
||||||
filter.set_filter_name(_("Images"));
|
filter.set_filter_name(_("Images"));
|
||||||
chooser.add_filter(filter);
|
chooser.add_filter(filter);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue