GNOME Bugzilla – Bug 759042
Distinguish smartphones and tablets from media players
Last modified: 2018-09-21 17:55:25 UTC
Problem: all MTP devices are identified as media players. That formerly made sense, but these days almost all MTP devices are smart phones or tablets, so it make increasingly less sense. When I plug in a smart phone or tablet in Nautilus, I'd prefer to see an icon for it than for a media player, even though the smartphone/tablet is almost certainly also a media player and a camera. Solution: somewhere in the Linux stack (perhaps starting with libmtp?), tag a device as being a smartphone or tablet, if applicable. Nautilus can then query for that tag in udev/GIO and display the correct icon in the sidebar. As at the time of filing this bug, I've yet to file a bug against libmtp, as I'm still determining if that bug report makes sense for that project.
-> gvfs That would need to happen in gvfs.
The icon for MTP devices is set based on the following code: https://git.gnome.org/browse/gvfs/tree/common/gvfsgphoto2utils.c#n123 ID_MEDIA_PLAYER_ICON_NAME udev property is used to set the icon if the property exists, otherwise "multimedia-player", or "camera-photo" is used depending on ID_MEDIA_PLAYER property. We might use "phone" icon instead of "multimedia-player", however I think it is still better to show "multimedia-player" for mobile phones, than "phone" for multimedia players... Solution would be to provide some udev rules to set ID_MEDIA_PLAYER_ICON_NAME properly, or set something useful to determine what type of device it is...
And ultimately, udev sets this flag based on whether libmtp recognises the device or libgphoto2 - roughly speaking. There's no way for libmtp to distinguish a media player from a phone except through hard-coding based on device identity - the spec doesn't offer any way and even things like looking at the software stack id (android vs microsoft, etc) is insufficient. I think this is probably futile and not worth the (on going) effort required. I think it might well be reasonable to default to a phone icon though, given that it what the majority of devices will be.
Since devices are already hard coded into libmtp's music-players.h, if I classified all its devices into one of [phone, tablet, music player, unknown], would the ongoing maintenance burden in future seem less of a problem? Please note I'm not offering to patch the actual source code. I am merely proposing to use python, Google and some common sense to extract into a text file the hard-coded model names, and append a classification to each. If it seems like a worthwhile plan I'd like a commitment from the libmtp maintainer(s) that they'd actually incorporate the classifications into code so that it can be picked up by udev ;-)
If you're serious about such a proposal, you'd need to bring it up on the libmtp mailing list and see what the response is.
I am ok to use "phone" icon instead of "multimedia-player", however the "phone" icon looks pretty weird in the nautilus to me. Maybe we might use "phone-apple-iphone" which looks a bit better, however it seems there isn't color version for it and it isn't fallbacked to "phone". It is probably bug, because we are already using the icon for afc devices... Maybe Jakub may do something with it, mayn't he?
Created attachment 317159 [details] screenshot with icons
We should probably update the phone icon, that symbolic was made after the gnome-icon-theme phone icon which was made when cell-phones looked like that :-)
I think a modern phone icon - a large screen with a small frame around it would also be a fair representation of a modern tablet or media player - so that's another reason why we don't need to distinguish them visually - there is no difference at this size :-)
Created attachment 317190 [details] [review] mtp: Use phone icon for MTP devices So I changed the icon to "phone" in master (commit 9843229) and file two bugs against adwaita-icon-theme (Bug 759335, Bug 759336).
I let the bug open to track Damon's work on libmtp...
See https://bugs.freedesktop.org/show_bug.cgi?id=102731 for the corresponding media-player-info change to avoid regressing the icon for "classic" (non-phone) media players.
-- 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/gvfs/issues/268.