Bug 102155

Summary: SQL files should have a generic text icon
Product: shared-mime-info Reporter: Alex Henrie <alexhenrie24>
Component: freedesktop.org.xmlAssignee: Shared Mime Info group <shared_mime_info>
Status: RESOLVED MOVED QA Contact:
Severity: normal    
Priority: medium Keywords: patch
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: [PATCH] Use generic text icon for application/sql

Description Alex Henrie 2017-08-11 17:11:27 UTC
Files of type application/sql are displayed with a generic application icon, when a generic text file icon would be much more appropriate.
Comment 1 Alex Henrie 2017-08-11 17:13:28 UTC
Created attachment 133444 [details] [review]
[PATCH] Use generic text icon for application/sql

The attached patch would fix this bug.
Comment 2 Bastien Nocera 2017-08-11 17:20:30 UTC
$ pwd
/usr/share/mime/application
$ grep '<sub-class-of type="text/plain"/>' * | wc -l
56

I think we're half-expecting the mime engine to look at those mime-types and assign them a text "generic icon" when it sees that it's a sub-class of text/plain.

Either we need to check whether xdg-mime implementations already do this, and mention it in the spec, or fix it up for all the mime-types, not just application/sql.
Comment 3 Alex Henrie 2017-08-11 17:52:04 UTC
I searched through freedesktop.org.xml.in and the only application media types that inherit from text/plain and do not specify an icon are:

application/sql - Should use the generic text icon

application/vnd.apple.mpegurl - Should NOT use the generic text icon because even though this is a text format, these files open in an audio or video player

application/x-trig - Should use the generic text icon

It really wouldn't be hard to explicitly specify the icon for application/sql and application/x-trig, like we do for dozens of other types that inherit from text/plain.
Comment 4 Alex Henrie 2017-08-11 18:01:57 UTC
By the way, you can see that the wrong icons are being used now just by running `touch test.sql test.trig test.txt` and looking at those files in your graphical file browser.
Comment 5 GitLab Migration User 2018-10-13 10:38:10 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org'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.freedesktop.org/xdg/shared-mime-info/issues/37.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.