You are not logged in.

Dear visitor, welcome to KDE-Forum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Friday, March 18th 2005, 4:51am

middle click close tabs? [konqueror]

Hi,
according to http://bugs.kde.org/show_bug.cgi?id=82957 we can do it, but I odn't understand:

Quoted


CVS commit by binner:

Hidden option for Bug 82957: Middle click on tab to close in Konqueror (wishlist)
CCMAIL: 82957-done@bugs.kde.org


M +10 -0 konq_tabs.cc 1.55
M +1 -0 konq_tabs.h 1.20


--- kdebase/konqueror/konq_tabs.cc #1.54:1.55
@@ -121,4 +121,5 @@ KonqFrameTabs::KonqFrameTabs(QWidget* pa
KConfigGroupSaver cs( config, QString::fromLatin1("FMSettings") );

+ m_MouseMiddleClickClosesTab = config->readBoolEntry( "MouseMiddleClickClosesTab", false );
m_maxLength = config->readNumEntry("MaximumTabLength", 30);
m_minLength = config->readNumEntry("MinimumTabLength", 3);
@@ -512,4 +513,12 @@ void KonqFrameTabs::slotMouseMiddleClick
void KonqFrameTabs::slotMouseMiddleClick( QWidget *w )
{
+ if ( m_MouseMiddleClickClosesTab ) {
+ if ( m_pChildFrameList->count() > 1 ) {
+ // Yes, I know this is an unchecked dynamic_cast - I'm casting sideways in a class hierarchy and it could crash one day, but I haven't checked setWorkingTab so I don't know if it can handle nulls.
+ m_pViewManager->mainWindow()->setWorkingTab( dynamic_cast<KonqFrameBase*>(w) );
+ emit ( removeTabPopup() );
+ }
+ }
+ else {
QApplication::clipboard()->setSelectionMode( QClipboard::Selection );
KURL filteredURL ( KonqMisc::konqFilteredURL( this, QApplication::clipboard()->text() ) );
@@ -520,4 +529,5 @@ void KonqFrameTabs::slotMouseMiddleClick
}
}
+ }
}


--- kdebase/konqueror/konq_tabs.h #1.19:1.20
@@ -128,4 +128,5 @@ private:
bool m_permanentCloseButtons;
bool m_alwaysTabBar;
+ bool m_MouseMiddleClickClosesTab;
};


what does all that mean? how do I get middle click close tab with it?

2

Friday, March 18th 2005, 8:21am

RE: middle click close tabs? [konqueror]

It means that a hidden option was added to Konqueror. A hidden option means that you add that functionality by changing the config-file. In this case, adding the line

Source code

1
MouseMiddleClickClosesTab=true
to ~/.kde/share/config/konquerorrc in the group [FMSettings] whould probably activate this option.

3

Monday, March 21st 2005, 2:44am

thank you, helped!