<table><tr><td style="">meven added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D26113">View Revision</a></tr></table><br /><div><div><blockquote style="border-left: 3px solid #8C98B8;
color: #6B748C;
font-style: italic;
margin: 4px 0 12px 0;
padding: 8px 12px;
background-color: #F8F9FC;">
<div style="font-style: normal;
padding-bottom: 4px;">In <a href="https://phabricator.kde.org/D26113#642018" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;">D26113#642018</a>, <a href="https://phabricator.kde.org/p/bruns/" style="
border-color: #f1f7ff;
color: #19558d;
background-color: #f1f7ff;
border: 1px solid transparent;
border-radius: 3px;
font-weight: bold;
padding: 0 4px;">@bruns</a> wrote:</div>
<div style="margin: 0;
padding: 0;
border: 0;
color: rgb(107, 116, 140);"><blockquote style="border-left: 3px solid #8C98B8;
color: #6B748C;
font-style: italic;
margin: 4px 0 12px 0;
padding: 8px 12px;
background-color: #F8F9FC;">
<div style="font-style: normal;
padding-bottom: 4px;">In <a href="https://phabricator.kde.org/D26113#641998" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;">D26113#641998</a>, <a href="https://phabricator.kde.org/p/meven/" style="
border-color: #f1f7ff;
color: #19558d;
background-color: #f1f7ff;
border: 1px solid transparent;
border-radius: 3px;
font-weight: bold;
padding: 0 4px;">@meven</a> wrote:</div>
<div style="margin: 0;
padding: 0;
border: 0;
color: rgb(107, 116, 140);"><blockquote style="border-left: 3px solid #8C98B8;
color: #6B748C;
font-style: italic;
margin: 4px 0 12px 0;
padding: 8px 12px;
background-color: #F8F9FC;">
<div style="font-style: normal;
padding-bottom: 4px;">In <a href="https://phabricator.kde.org/D26113#641190" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;">D26113#641190</a>, <a href="https://phabricator.kde.org/p/bruns/" style="
border-color: #f1f7ff;
color: #19558d;
background-color: #f1f7ff;
border: 1px solid transparent;
border-radius: 3px;
font-weight: bold;
padding: 0 4px;">@bruns</a> wrote:</div>
<div style="margin: 0;
padding: 0;
border: 0;
color: rgb(107, 116, 140);"><blockquote style="border-left: 3px solid #8C98B8;
color: #6B748C;
font-style: italic;
margin: 4px 0 12px 0;
padding: 8px 12px;
background-color: #F8F9FC;">
<div style="font-style: normal;
padding-bottom: 4px;">In <a href="https://phabricator.kde.org/D26113#581228" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;">D26113#581228</a>, <a href="https://phabricator.kde.org/p/ngraham/" style="
border-color: #f1f7ff;
color: #19558d;
background-color: #f1f7ff;
border: 1px solid transparent;
border-radius: 3px;
font-weight: bold;
padding: 0 4px;">@ngraham</a> wrote:</div>
<div style="margin: 0;
padding: 0;
border: 0;
color: rgb(107, 116, 140);"><blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>As Vaults are not backed by an fstab entry, it would be the responsibility of Vaults to set a useful name (via x-gvfs-name).</p></blockquote>
<p>What I'm saying is that I think it makes sense for Solid to provide a better default display string so each app doesn't have to do this.</p></div>
</blockquote>
<p>What I'm saying is that Vaults should set a meaningful value via x-gvfs-name so Solid has not to invent something. Then Solid can use that, and it would be consistent everywhere.</p></div>
</blockquote>
<p>I see, so I think we should add a "displayName" (or label() similarly to StorageVolume) function to Solid::Device, so that x-gvfs-name is used for this or the mount point when not defined and keeping description as is : a verbose description of the Device that could be used in tooltips for instance.<br />
This displayName would default on description() so that it would be an opt-in change by Device implementation and then users can choose between description() and displayName() depending on the context and role they need. So here in kfileplacesitem we would replace description() by displayName().<br />
Does this idea make sense to you <a href="https://phabricator.kde.org/p/bruns/" style="
border-color: #f1f7ff;
color: #19558d;
background-color: #f1f7ff;
border: 1px solid transparent;
border-radius: 3px;
font-weight: bold;
padding: 0 4px;">@bruns</a> ?</p></div>
</blockquote>
<p>Its already there:</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">grep x-gvfs-name /etc/fstab
//pebbles/share /mnt cifs defaults,x-gvfs-show,x-gvfs-icon=yast-samba-server,x-gvfs-name=SambaShare</pre></div>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">solid-hardware5 details /org/kde/fstab///pebbles/share
udi = '/org/kde/fstab///pebbles/share'
parent = '/org/kde/fstab' (string)
vendor = 'pebbles' (string)
product = 'share' (string)
description = 'SambaShare' (string)
icon = 'yast-samba-server' (string)
StorageAccess.accessible = false (bool)
StorageAccess.filePath = '/mnt' (string)
StorageAccess.ignored = false (bool)
NetworkShare.type = 'Cifs' (0x2) (enum)
NetworkShare.url = 'smb://pebbles/share' (string)</pre></div>
<p><a href="https://phabricator.kde.org/F8216997" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;">F8216997: Screenshot_20200405_124325.png</a></p></div>
</blockquote>
<p>A lot of users won't have a x-gvfs-name for whatever reason and we can't expect them to be take savy with root access to set up a x-gvfs-name mount option.<br />
I see your point but my last one was how to make the display by default better (not using description()), but keeping displaying x-gvfs-name value when defined by the user.</p>
<p>So we need a more general solution, which is what I suggest.</p>
<p>Moreover setting description to x-gvfs-name makes the original description content inaccessible to application despite it could be valuable, for instance for tooltip.<br />
So I think putting x-gvfs-name in description was abusing the API for it was lacking a proper displayName/label field to begin with.<br />
I hope this clarifies my suggestion in <a href="https://phabricator.kde.org/D26113#641998" class="remarkup-link" target="_blank" rel="noreferrer">https://phabricator.kde.org/D26113#641998</a></p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R241 KIO</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D26113">https://phabricator.kde.org/D26113</a></div></div><br /><div><strong>To: </strong>meven, Frameworks, ngraham<br /><strong>Cc: </strong>feverfew, bruns, broulik, kde-frameworks-devel, LeGast00n, cblack, GB_2, michaelh, ngraham<br /></div>