Usability Issue - Never displaying the Nepomuk URI

Frank Reininghaus frank78ac at googlemail.com
Wed Nov 28 16:47:30 GMT 2012


Hi Vishesh,

2012/11/28 Vishesh Handa <me at vhanda.in>:
> Hey everyone
>
> This week I have been working on improving the Nepomuk kioslaves, and I've
> encountered a problem with Dolphin (and Konqueror). The problem is explained
> in quite detail in this bug report [1]. The basic problem is that the user
> should never see "nepomuk:res/uuid". It's the internal name of the resource
> and it should not matter to the user.
>
> The problem comes when opening nepomuk uris via the nepomuk kio slave. For
> example - The user searches for "Coldplay" (via krunner) and gets a
> "Contact" which they select. This gives them a url of the form
> 'nepomuk:/res/adfafadf', and opens it with the file manager. Dolphin then
> displays this URL via the nepomuk kio slave, and the files related to
> "Coldplay" are shown.
>
> The problematic part is that the window title (and tab name) are displayed
> as "nepomuk - res/uuid", which is ugly. I checked and the UDS_DISPLAY_NAME,
> is set to "Coldplay". But Dolphin operates only on URLs.
>
> Here is the relevant code -
>
> // dolphinmainwindow.cpp:2025
> QString DolphinMainWindow::tabName(const KUrl& url) const
> {
>     QString name;
>     if (url.equals(KUrl("file:///"))) {
>         name = '/';
>     } else {
>         name = url.fileName();
>         if (name.isEmpty()) {
>             name = url.protocol();
>         } else {
>             // Make sure that a '&' inside the directory name is displayed
> correctly
>             // and not misinterpreted as a keyboard shortcut in
> QTabBar::setTabText()
>             name.replace('&', "&&");
>         }
>     }
>     return name;
> }
>
> This clearly only operates on the URL instead of the UDS Entries. Would it
> be a big change to stat the url and then use the display name? (
> KFileItem::text() ? )

well, I think we would have to create a KIO::StatJob, connect a slot
to its result() signal and set the window and tab title in that slot.
The problem I see is that we have to use something as a temporary
window+tab title while we are waiting for the signal. Consider that
the StatJob might take some time if the URL is on a slow remote server
- I wouldn't want to show an empty title until we get a result. If we
use the URL to generate a temporary title, we still have the problem
that the unwanted Nepomuk URI is visible, maybe it would even be worse
because the asynchronous change of the title could irritate users.

Best regards,
Frank




More information about the kfm-devel mailing list