summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2019-04-10 00:30:39 +0300
committerraveit65 <[email protected]>2019-04-12 20:08:38 +0200
commitf6d36b99c01aa3cc33bc97b3edb156cc6cf1863f (patch)
treeef0cc78edc11d792b9ffd283e303470b348853c7
parent2ee2304fe1ac10c695c1e4eb59138417a8b13ac6 (diff)
downloadeom-f6d36b99c01aa3cc33bc97b3edb156cc6cf1863f.tar.bz2
eom-f6d36b99c01aa3cc33bc97b3edb156cc6cf1863f.tar.xz
store: Add any image file in the current directory to the store
This allows eom to navigate through all image files in a directory without having to manually load them into the store.
-rw-r--r--data/eom.desktop.in.in2
-rw-r--r--src/eom-list-store.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/data/eom.desktop.in.in b/data/eom.desktop.in.in
index f4ffbe0..938bb7c 100644
--- a/data/eom.desktop.in.in
+++ b/data/eom.desktop.in.in
@@ -14,4 +14,4 @@ X-MATE-Bugzilla-Product=EOM
X-MATE-Bugzilla-Component=general
X-MATE-Bugzilla-Version=@VERSION@
X-MATE-DocPath=eom/index.docbook
-MimeType=image/bmp;image/gif;image/jpeg;image/jpg;image/pjpeg;image/png;image/tiff;image/x-bmp;image/x-gray;image/x-icb;image/x-ico;image/x-png;image/x-portable-anymap;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;image/x-xbitmap;image/x-xpixmap;image/x-pcx;image/svg+xml;image/svg+xml-compressed;image/vnd.wap.wbmp;
+MimeType=image/*;
diff --git a/src/eom-list-store.c b/src/eom-list-store.c
index 4be7e02..71ac565 100644
--- a/src/eom-list-store.c
+++ b/src/eom-list-store.c
@@ -475,8 +475,9 @@ directory_visit (GFile *directory,
mime_type = g_file_info_get_content_type (children_info);
name = g_file_info_get_name (children_info);
- if (!g_str_has_prefix (name, ".")) {
- if (eom_image_is_supported_mime_type (mime_type)) {
+ if (!g_str_has_prefix (name, ".")) {
+ /* We support opening any image type, so let eom to add any images in the current directory to the store */
+ if (g_content_type_is_mime_type (mime_type, "image/*") || eom_image_is_supported_mime_type (mime_type)) {
load_uri = TRUE;
}
}