| Summary: | Back and forward buttons available in context menu | ||
|---|---|---|---|
| Product: | [Applications] kdevelop | Reporter: | Robert Jonsson <rj> |
| Component: | doctreeview | Assignee: | KDevelop Developers <kdevelop-devel> |
| Status: | RESOLVED FIXED | ||
| Severity: | wishlist | ||
| Priority: | NOR | ||
| Version First Reported In: | 3.0.0a5 | ||
| Target Milestone: | --- | ||
| Platform: | unspecified | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | Suggested Patch | ||
|
Description
Robert Jonsson
2003-08-18 16:20:59 UTC
Created attachment 4155 [details]
Suggested Patch
This was annoying me as well. Here is a suggested patch to add the "Back" and
"Forward" actions to the context menu in the documentation viewer.
Nice. Will apply when CVS freeze is over. Thanks for the patch. Subject: kdevelop/src CVS commit by dagerbo: Commit suggested patch for bug 62888. Thanks to Dan Christensen for the patch. CCMAIL: 62888-done@bugs.kde.org M +14 -0 documentationpart.cpp 1.18 --- kdevelop/src/documentationpart.cpp #1.17:1.18 @@ -6,6 +6,9 @@ #include <kpopupmenu.h> #include <kiconloader.h> +#include <kmainwindow.h> +#include "kdevmainwindow.h" #include "partcontroller.h" +#include "toplevel.h" @@ -41,4 +44,15 @@ void DocumentationPart::popup( const QSt KPopupMenu *m_popup = new KPopupMenu( i18n( "Documentation Viewer" ), this->widget() ); + // Install the global back and forward actions, if they are available + KActionCollection *actions = TopLevel::getInstance()->main()->actionCollection(); + KAction *backAction = actions->action("browser_back"); + KAction *forwardAction = actions->action("browser_forward"); + if(backAction && forwardAction) + { + backAction->plug(m_popup); + forwardAction->plug(m_popup); + m_popup->insertSeparator(); + } + duplicateAction->plug(m_popup); int idNewWindow = -2; |