D8273: Change window title when searching

Elvis Angelaccio noreply at phabricator.kde.org
Sun Nov 12 18:09:17 GMT 2017


elvisangelaccio requested changes to this revision.
elvisangelaccio added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> dolphinmainwindow.cpp:1004
>  
> +    if (url.scheme().contains(QStringLiteral("search"))) {
> +        QString search;

Old patch was using `if (m_activeViewContainer->isSearchModeEnabled())`, why did you change it? (should be faster as it doesn't perform a substring match).

> dolphinmainwindow.cpp:1007
> +        if (!m_activeViewContainer->currentFacet().isEmpty()) {
> +            search = i18n("Search for %1 named ", m_activeViewContainer->currentFacet());
> +        } else {

I'm not sure it's worth putting the facets in the title. Currently I see the following issues:

1. We should not concatenate i18n strings, there should be a `%2` placeholder for `text`.
2. If I select the Folder facet but I don't type anything, I get `Search for Folder named `.
3. Facets are not translated.

> dolphinmainwindow.cpp:1009
> +        } else {
> +            search = i18n("Search for ");
> +        }

Same here, use `%1` as placeholder for `text`.

REVISION DETAIL
  https://phabricator.kde.org/D8273

To: xyquadrat, #dolphin, #kde_applications, ngraham, elvisangelaccio
Cc: anthonyfieroni, elvisangelaccio, markg, rkflx, emmanuelp, ngraham, #dolphin, spoorun, navarromorales, firef, andrebarros
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20171112/92a7fa65/attachment.htm>


More information about the kfm-devel mailing list