GNOME Bugzilla – Bug 745375
Icons should not be displayed in "Photos" tab.
Last modified: 2018-01-23 09:47:08 UTC
Created attachment 298220 [details] Icons should not be displayed in RECENT tab. Icons of files should not be displayed in the RECENT tab. The RECENT tab displays all the photos that the tracker locates in the directories it checks. IMHO, this should not be the case and the icon images if present should be recognized, probably by checking the size of the images, because the icons have predefined standard sizes as 16x16, 32x32, 48x48, 256x256.
Created attachment 317222 [details] [review] Patch for the bug. The patch modifies src/photos-search-type-manager.c to include a filter for Photos tab. Filtering of icons is based on dimensions (greater than 128 pixels). But the Recent tab still shows the icons.
Created attachment 338746 [details] [review] search-type-manager: Filter small images This patch filters all the images with size less then 128 x 128 px. I have introduced 2 filters one has a condition for filtering small images and other one is just logical and of gif_filter and small_images_filter I used small_images_and_gif_filter because the base_manager_add_object was otherwise adding the images without letting small_images_filter to filter the small images so logical and with gif_filter fixed the problem.
Created attachment 338903 [details] image with dimensions 66x768 px should the image attached be shown in the photos tab? it is small on one side but larger on the other. or should only the icons with given dimensions above be removed and everything else be shown? I saw in the roadmap that "Small images (eg., icons) should be hidden from the Photos view." linked to this bug. what is the exact standard for these small images?
Review of attachment 317222 [details] [review]: Please look at the latest version of the source code : src/photos-search-type-manager.c before working on the comments. ::: src/photos-search-type-manager.c @@ +91,1 @@ Nitpick: Variable naming. icon_filter suits better? @@ +101,1 @@ We try not to hard value (128, 128) unless it's really inevitable. Plus this will allow high-res but still "icons" show in the overview mode? Did you talk to Designers and maintainers about how to choose the filtering criteria? You might wanna drop in #photos and #gnome-design on GIMPNet @@ +126,3 @@ _("Photos"), "?urn a nmm:Photo", + photos_filter); Leaking photos_filter. Should have been freed with g_free
Review of attachment 338746 [details] [review]: See previous comment. ::: src/photos-search-type-manager.c @@ +104,2 @@ gif_filter = g_strdup ("nie:mimeType(?urn) != 'image/gif'"); + small_image_filter= g_strdup_printf("((nfo:height(?urn) > %d) && (nfo:width(?urn) > %d))",128,128); mis-aligned "=", space after "g_strdup_printf" @@ +104,3 @@ gif_filter = g_strdup ("nie:mimeType(?urn) != 'image/gif'"); + small_image_filter= g_strdup_printf("((nfo:height(?urn) > %d) && (nfo:width(?urn) > %d))",128,128); + small_image_and_gif_filter=g_strdup_printf("%s && %s", gif_filter, small_image_filter); space around "=" @@ +139,3 @@ _("Photos"), "?urn a nmm:Photo", + small_image_and_gif_filter); Please see latest version of src/photos-search-type-manager.c
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-photos/issues/25.