Bug 62888 - Back and forward buttons available in context menu
Summary: Back and forward buttons available in context menu
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: doctreeview (show other bugs)
Version: 3.0.0a5
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: KDevelop Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-18 16:20 UTC by Robert Jonsson
Modified: 2004-01-21 16:23 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Suggested Patch (757 bytes, patch)
2004-01-14 00:58 UTC, Dan Christensen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Jonsson 2003-08-18 16:20:59 UTC
Version:           3.0.0a5 (using KDE 3.1.3)
Compiler:          gcc version 3.3.1 (Mandrake Linux 9.2 3.3.1-0.7mdk)
OS:          Linux (i686) release 2.4.21-0.13mdk

The back/forward buttons up in the toolbar. It strikes me as a great addition to add these to the document-context-menu also. Similar to the way a web browser handles this.
Comment 1 Dan Christensen 2004-01-14 00:58: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.
Comment 2 Jens Dagerbo 2004-01-14 01:22:40 UTC
Nice. Will apply when CVS freeze is over. Thanks for the patch.
Comment 3 Jens Dagerbo 2004-01-21 16:23:32 UTC
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;