[simple-scan] Restrict image file filter to supported image formats.
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [simple-scan] Restrict image file filter to supported image formats.
- Date: Thu, 27 Apr 2017 20:05:24 +0000 (UTC)
commit 1b3c99bc73b7ae490268f8a6974f026c588c191c
Author: Stéphane Fillion <stphanef3724 gmail com>
Date: Thu Apr 27 12:26:50 2017 -0400
Restrict image file filter to supported image formats.
Old image file filter displayed many file with image formats supported by
Gdk.Pixbuf but unsupported by Simple-Scan. By example, it showed bmp images.
Selecting such file didn't have the expected result of saving in bmp format but
replaced the bmp image by a jpeg one. The new behaviour is to only display files
simple-scan support.
src/ui.vala | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/ui.vala b/src/ui.vala
index 2265a13..29b2169 100644
--- a/src/ui.vala
+++ b/src/ui.vala
@@ -532,9 +532,10 @@ public class UserInterface : Gtk.ApplicationWindow
/* Filter to only show images by default */
var filter = new Gtk.FileFilter ();
- filter.set_filter_name (/* Save dialog: Filter name to show only image files */
+ filter.set_filter_name (/* Save dialog: Filter name to show only supported image files */
_("Image Files"));
- filter.add_pixbuf_formats ();
+ filter.add_mime_type ("image/jpeg");
+ filter.add_mime_type ("image/png");
filter.add_mime_type ("application/pdf");
save_dialog.add_filter (filter);
filter = new Gtk.FileFilter ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]