mirror of
https://github.com/KDE/konsole.git
synced 2026-05-19 20:15:36 -04:00
Close tabs when clicked with middle mouse button.
BUG: 137938 svn path=/trunk/KDE/kdebase/apps/konsole/; revision=788960
This commit is contained in:
@@ -471,6 +471,7 @@ TabbedViewContainerV2::TabbedViewContainerV2(NavigationPosition position , QObje
|
||||
connect( _tabBar , SIGNAL(tabDoubleClicked(int)) , this , SLOT(tabDoubleClicked(int)) );
|
||||
connect( _tabBar , SIGNAL(newTabRequest()) , this , SIGNAL(newViewRequest()) );
|
||||
connect( _tabBar , SIGNAL(wheelDelta(int)) , this , SLOT(wheelScrolled(int)) );
|
||||
connect( _tabBar , SIGNAL(mouseMiddleClick(int)) , this , SLOT(closeTab(int)) );
|
||||
|
||||
_layout = new TabbedViewContainerV2Layout;
|
||||
_layout->setSpacing(0);
|
||||
@@ -497,6 +498,11 @@ TabbedViewContainerV2::TabbedViewContainerV2(NavigationPosition position , QObje
|
||||
|
||||
_containerWidget->setLayout(_layout);
|
||||
}
|
||||
void TabbedViewContainerV2::closeTab(int tab)
|
||||
{
|
||||
Q_ASSERT(tab >= 0 && tab < _stackWidget->count());
|
||||
removeView(_stackWidget->widget(tab));
|
||||
}
|
||||
void TabbedViewContainerV2::setTabBarVisible(bool visible)
|
||||
{
|
||||
_tabBar->setVisible(visible);
|
||||
|
||||
Reference in New Issue
Block a user