D19311: Add navigation history to forward/back buttons

David Hallas noreply at phabricator.kde.org
Mon Feb 25 17:48:12 GMT 2019


hallas added a comment.


  This change is still WIP and is meant as a discussion point. I would like to get some feedback on this in general but most specifically around what to show in the navigation drop down? Currently I just put the full URL there but that is not very user friendly.

INLINE COMMENTS

> dolphinmainwindow.cpp:90
> +    // The maximum number of entries in the back/forward popup menu
> +    const int MaxNumberOfNavigationentries = 10;
>  }

Should this be user configurable? Is 10 a good number?

> dolphinmainwindow.cpp:610
> +    for (int i = urlNav->historyIndex() + 1; i < urlNav->historySize() && entries < MaxNumberOfNavigationentries; ++i, ++entries) {
> +        QAction* action = new QAction(urlNav->locationUrl(i).toString(), m_backAction->menu());
> +        action->setData(i);

What should we use as the action title? The full URL doesn't seem optimal :)

> dolphinmainwindow.cpp:631
> +    for (int i = urlNav->historyIndex() - 1; i >= 0 && entries < MaxNumberOfNavigationentries; --i, ++entries) {
> +        QAction* action = new QAction(urlNav->locationUrl(i).toString(), m_forwardAction->menu());
> +        action->setData(i);

What should we use as the action title? The full URL doesn't seem optimal :)

> dolphinmainwindow.cpp:1224
> +    // TODO - FIX RightToLeft
> +    m_backAction = new KToolBarPopupAction(QIcon::fromTheme(QStringLiteral("go-previous")), i18nc("go back", "&Back"),
> +                                           actionCollection());

I copied some of this stuff from the implementation of KStandardAction::back but that function actually changes the icon on Right To Left systems, so should I do the same here?

> dolphinmainwindow.cpp:1256
> +    // TODO - FIX RightToLeft
> +    m_forwardAction = new KToolBarPopupAction(QIcon::fromTheme(QStringLiteral("go-next")),
> +                                              i18nc("go forward", "&Forward"), actionCollection());

I copied some of this stuff from the implementation of KStandardAction::forward but that function actually changes the icon on Right To Left systems, so should I do the same here?

REPOSITORY
  R318 Dolphin

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

To: hallas, #dolphin, ngraham, elvisangelaccio
Cc: kfm-devel, alexde, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20190225/c123bf8b/attachment.htm>


More information about the kfm-devel mailing list