diff --git a/src/ViewContainer.cpp b/src/ViewContainer.cpp index 30de6f0c..8962d8e5 100644 --- a/src/ViewContainer.cpp +++ b/src/ViewContainer.cpp @@ -605,6 +605,7 @@ TabbedViewContainerV2::TabbedViewContainerV2(NavigationPosition position , QObje connect( _tabBar , SIGNAL(currentChanged(int)) , this , SLOT(currentTabChanged(int)) ); 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)) ); connect( _tabBar , SIGNAL(initiateDrag(int)) , this , SLOT(startTabDrag(int)) ); diff --git a/src/ViewContainer.h b/src/ViewContainer.h index e06f69aa..6328b33e 100644 --- a/src/ViewContainer.h +++ b/src/ViewContainer.h @@ -240,6 +240,9 @@ signals: /** Emitted when the user requests to close a view */ void closeRequest(QWidget* activeView); + /** Emitted when the user requests to open a new view */ + void newViewRequest(); + /** * Emitted when the user requests to move a view from another container * into this container. If 'success' is set to true by a connected slot diff --git a/src/ViewManager.cpp b/src/ViewManager.cpp index db3419a4..87779ccd 100644 --- a/src/ViewManager.cpp +++ b/src/ViewManager.cpp @@ -576,6 +576,7 @@ ViewContainer* ViewManager::createContainer(const Profile::Ptr info) SLOT(map()) ); _containerSignalMapper->setMapping(container,container); + connect( container, SIGNAL(newViewRequest()), this, SIGNAL(newViewRequest()) ); connect( container, SIGNAL(moveViewRequest(int,int,bool&)), this , SLOT(containerMoveViewRequest(int,int,bool&)) ); connect( container , SIGNAL(viewRemoved(QWidget*)) , this , SLOT(viewCloseRequest(QWidget*)) );