[Bug 62888] Back and forward buttons available in context menu

Jens Dagerbo jens.dagerbo at swipnet.se
Wed Jan 21 16:24:02 UTC 2004


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
      
http://bugs.kde.org/show_bug.cgi?id=62888      
jens.dagerbo at swipnet.se changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From jens.dagerbo at swipnet.se  2004-01-21 16:23 -------
Subject: kdevelop/src

CVS commit by dagerbo: 

Commit suggested patch for bug 62888.

Thanks to Dan Christensen for the patch.

CCMAIL: 62888-done at 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;




More information about the KDevelop-devel mailing list