Skip to content

Commit

Permalink
Merge pull request #42 from oscfdezdz/tools
Browse files Browse the repository at this point in the history
tools: Add All Suported Images filter to FileChooser
  • Loading branch information
oscfdezdz authored Aug 16, 2022
2 parents 4a009ae + da90d88 commit 4a44de1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,19 @@ def music_length_to_string(length):


def add_filters(dialog):
filter_all = Gtk.FileFilter()
filter_all.set_name(_("All Suported Images"))
filter_all.add_mime_type("image/png")
filter_all.add_mime_type("image/jpeg")
dialog.add_filter(filter_all)

filter_png = Gtk.FileFilter()
filter_png.set_name(_("PNG images"))
filter_png.set_name(_("PNG Images"))
filter_png.add_mime_type("image/png")
dialog.add_filter(filter_png)

filter_jpeg = Gtk.FileFilter()
filter_jpeg.set_name(_("JPEG images"))
filter_jpeg.set_name(_("JPEG Images"))
filter_jpeg.add_mime_type("image/jpeg")
dialog.add_filter(filter_jpeg)

Expand Down

0 comments on commit 4a44de1

Please sign in to comment.