--Boundary-00=_ci//Aks/ZKiOmvf
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Hello!
I think now my patch is on the right mailing list:
This patch enables to navigate with the side buttons of a mouse with five
buttons through the konqueror history. I've read very often that this feature
is wanted. At most cases these people use imwheel, but I didn't want to use
it. So I made a patch which directly enables this function in the konqueror.
In this patch I used the QWheel event which reacts to the side buttons.
Nicolas Bellm
--Boundary-00=_ci//Aks/ZKiOmvf
Content-Type: text/x-diff; charset="us-ascii";
name="sidebuttons_withoption.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="sidebuttons_withoption.diff"
Index: kcontrol/konqhtml/htmlopts.cpp
===================================================================
RCS file: /home/kde/kdebase/kcontrol/konqhtml/htmlopts.cpp,v
retrieving revision 1.85
diff -U3 -r1.85 htmlopts.cpp
--- kcontrol/konqhtml/htmlopts.cpp 13 Jun 2004 11:56:12 -0000 1.85
+++ kcontrol/konqhtml/htmlopts.cpp 14 Jul 2004 20:23:30 -0000
@@ -117,6 +117,22 @@
"To access the context menu, press the right mouse button and move." ) );
connect(m_pBackRightClick, SIGNAL(clicked()), this, SLOT(slotChanged()));
+ m_pSideButtons = new QCheckBox( i18n( "Navigate with &Forward && Back Internet Buttons through the history" ), bgMouse );
+ QWhatsThis::add( m_pSideButtons, i18n(
+ "If this box is checked, you can navigate through the history with the Forward & Back Internet Buttons.
"
+ "For using this function the mouse section in your XF86Config have to look like this:" ) +
+ "
Section \"InputDevice\"" ); + connect(m_pSideButtons, SIGNAL(clicked()), this, SLOT(slotChanged())); + lay->addMultiCellWidget( bgMouse, row, row, 0, 1 ); row++; @@ -202,6 +218,7 @@ SET_GROUP( "MainView Settings" ); bool bOpenMiddleClick = READ_BOOL( "OpenMiddleClick", true ); bool bBackRightClick = READ_BOOL( "BackRightClick", false ); + bool bSideButtons = READ_BOOL( "SideButtons", true ); SET_GROUP( "HTML Settings" ); bool changeCursor = READ_BOOL("ChangeCursor", KDE_DEFAULT_CHANGECURSOR); bool underlineLinks = READ_BOOL("UnderlineLinks", DEFAULT_UNDERLINELINKS); @@ -217,6 +234,7 @@ m_pAutoRedirectCheckBox->setChecked( bAutoRedirect ); m_pOpenMiddleClick->setChecked( bOpenMiddleClick ); m_pBackRightClick->setChecked( bBackRightClick ); + m_pSideButtons->setChecked( bSideButtons ); // we use two keys for link underlining so that this config file // is backwards compatible with KDE 2.0. the HoverLink setting @@ -268,6 +286,7 @@ m_pConfig->setGroup( "MainView Settings" ); m_pConfig->writeEntry( "OpenMiddleClick", m_pOpenMiddleClick->isChecked() ); m_pConfig->writeEntry( "BackRightClick", m_pBackRightClick->isChecked() ); + m_pConfig->writeEntry( "SideButtons", m_pSideButtons->isChecked() ); m_pConfig->setGroup( "HTML Settings" ); m_pConfig->writeEntry( "ChangeCursor", m_cbCursor->isChecked() ); m_pConfig->writeEntry( "AutoLoadImages", m_pAutoLoadImagesCheckBox->isChecked() ); Index: kcontrol/konqhtml/htmlopts.h =================================================================== RCS file: /home/kde/kdebase/kcontrol/konqhtml/htmlopts.h,v retrieving revision 1.34 diff -U3 -r1.34 htmlopts.h --- kcontrol/konqhtml/htmlopts.h 13 Jun 2004 11:56:12 -0000 1.34 +++ kcontrol/konqhtml/htmlopts.h 14 Jul 2004 20:23:30 -0000 @@ -56,6 +56,7 @@ QCheckBox* m_pAutoRedirectCheckBox; QCheckBox* m_pOpenMiddleClick; QCheckBox* m_pBackRightClick; + QCheckBox* m_pSideButtons; QCheckBox* m_pShowMMBInTabs; QCheckBox* m_pFormCompletionCheckBox; QCheckBox* m_pDynamicTabbarHide; Index: konqueror/konq_mainwindow.cc =================================================================== RCS file: /home/kde/kdebase/konqueror/konq_mainwindow.cc,v retrieving revision 1.1337 diff -U3 -r1.1337 konq_mainwindow.cc --- konqueror/konq_mainwindow.cc 29 Jun 2004 09:59:08 -0000 1.1337 +++ konqueror/konq_mainwindow.cc 14 Jul 2004 20:23:42 -0000 @@ -257,6 +257,7 @@ m_bHTMLAllowed = config->readBoolEntry( "HTMLAllowed", false ); m_sViewModeForDirectory = config->readEntry( "ViewMode" ); m_bBackRightClick = config->readBoolEntry( "BackRightClick", false ); + m_bSideButtons = config->readBoolEntry( "SideButtons", true ); m_ptaUseHTML->setChecked( m_bHTMLAllowed ); m_paSaveViewPropertiesLocally->setChecked( m_bSaveViewPropertiesLocally ); @@ -4389,6 +4390,7 @@ KConfig *config = KGlobal::config(); KConfigGroupSaver cgs(config,"MainView Settings"); m_bBackRightClick = config->readBoolEntry( "BackRightClick", false ); + m_bSideButtons = config->readBoolEntry( "SideButtons", true ); m_bSaveViewPropertiesLocally = config->readBoolEntry( "SaveViewPropertiesLocally", false ); m_bHTMLAllowed = config->readBoolEntry( "HTMLAllowed", false ); m_sViewModeForDirectory = config->readEntry( "ViewMode" ); Index: konqueror/konq_mainwindow.h =================================================================== RCS file: /home/kde/kdebase/konqueror/konq_mainwindow.h,v retrieving revision 1.436 diff -U3 -r1.436 konq_mainwindow.h --- konqueror/konq_mainwindow.h 12 Jun 2004 22:13:09 -0000 1.436 +++ konqueror/konq_mainwindow.h 14 Jul 2004 20:23:43 -0000 @@ -226,6 +226,8 @@ bool isBackRightClickEnabled() const { return m_bBackRightClick; } + bool isSideButtonsEnabled() const { return m_bSideButtons; } + bool saveViewPropertiesLocally() const { return m_bSaveViewPropertiesLocally; } static QPtrList
" + " Identifier \"Generic Mouse\"
" + " Driver \"mouse\"
" + " Option \"CorePointer\"
" + " Option \"Device\" \"/dev/psaux\"
" + " Option \"Protocol\" \"ExplorerPS/2\"
" + " Option \"Emulate3Buttons\" \"false\"
" + " Option \"ZAxisMapping\" \"4 5\"
" + " Option \"Buttons\" \"7\"
" + "EndSection