Commit d7f19744 authored by Robert Knight's avatar Robert Knight

Remove the 'Merge Windows' menu item for now as it is non-functional. I will...

Remove the 'Merge Windows' menu item for now as it is non-functional.  I will need to implement it properly later.

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=661892
parent b0008e10
......@@ -110,12 +110,14 @@ void MainWindow::activeViewChanged(SessionController* controller)
{
disconnect( _pluggedController , SIGNAL(titleChanged(ViewProperties*))
, this , SLOT(activeViewTitleChanged(ViewProperties*)) );
guiFactory()->removeClient(_pluggedController);
}
Q_ASSERT( controller );
connect( controller , SIGNAL(titleChanged(ViewProperties*)) ,
this , SLOT(activeViewTitleChanged(ViewProperties*)) );
guiFactory()->removeClient(_pluggedController);
guiFactory()->addClient(controller);
// update session title to match newly activated session
......@@ -179,9 +181,11 @@ void MainWindow::setupActions()
hideMenuBarAction->setText( i18n("Hide MenuBar") );
connect( hideMenuBarAction , SIGNAL(triggered()) , menuBar() , SLOT(hide()) );
QAction* mergeAction = collection->addAction("merge-windows");
mergeAction->setText( i18n("&Merge Windows") );
connect( mergeAction , SIGNAL(triggered()) , this , SLOT(mergeWindows()) );
//TODO - Implmement this correctly
//
//QAction* mergeAction = collection->addAction("merge-windows");
//mergeAction->setText( i18n("&Merge Windows") );
//connect( mergeAction , SIGNAL(triggered()) , this , SLOT(mergeWindows()) );
// Settings Menu
KStandardAction::configureNotifications( 0 , 0 , collection );
......@@ -259,11 +263,13 @@ void MainWindow::mergeWindows()
while (topLevelIter.hasNext())
{
MainWindow* window = qobject_cast<MainWindow*>(topLevelIter.next());
QWidget* w = topLevelIter.next();
qDebug() << "Top level widget: " << w->metaObject()->className();
MainWindow* window = qobject_cast<MainWindow*>(w);
if ( window && window != this )
{
_viewManager->merge( window->_viewManager );
window->deleteLater();
//window->close();
}
}
}
......
......@@ -463,13 +463,14 @@ void ViewManager::merge(ViewManager* otherManager)
TerminalDisplay* view = dynamic_cast<TerminalDisplay*>(otherViewIter.next());
assert(view);
assert( otherManager->_sessionMap[view] );
takeView(otherManager,otherContainer,activeContainer,view);
createView(otherManager->_sessionMap[view]);
}
}
void ViewManager::takeView(ViewManager* otherManager , ViewContainer* otherContainer,
/*void ViewManager::takeView(ViewManager* otherManager , ViewContainer* otherContainer,
ViewContainer* newContainer, TerminalDisplay* view)
{
// FIXME - the controller associated with the display which is being moved
......@@ -483,7 +484,7 @@ void ViewManager::takeView(ViewManager* otherManager , ViewContainer* otherConta
// transfer the session map entries
_sessionMap.insert(view,otherManager->_sessionMap[view]);
otherManager->_sessionMap.remove(view);
}
}*/
TerminalDisplay* ViewManager::createTerminalDisplay()
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment