mirror of
https://github.com/KDE/konsole.git
synced 2026-05-04 12:44:23 -04:00
Don't switch tabs when a non-active session finishes ( Bug #146639 ). Begin implementation of Send Input to All in new front-end.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=674139
This commit is contained in:
@@ -254,13 +254,16 @@ void ViewManager::detachActiveView()
|
||||
|
||||
void ViewManager::sessionFinished()
|
||||
{
|
||||
// switch to the previous view before deleting the session views to prevent flicker
|
||||
// occurring as a result of an interval between removing the active view and switching
|
||||
// to the previous view
|
||||
previousView();
|
||||
|
||||
Session* session = qobject_cast<Session*>(sender());
|
||||
|
||||
if ( _sessionMap[qobject_cast<TerminalDisplay*>(activeView())] == session )
|
||||
{
|
||||
// switch to the previous view before deleting the session views to prevent flicker
|
||||
// occurring as a result of an interval between removing the active view and switching
|
||||
// to the previous view
|
||||
previousView();
|
||||
}
|
||||
|
||||
Q_ASSERT(session);
|
||||
|
||||
QList<TerminalDisplay*> children = _viewSplitter->findChildren<TerminalDisplay*>();
|
||||
@@ -406,7 +409,8 @@ SessionController* ViewManager::createController(Session* session , TerminalDisp
|
||||
connect( controller , SIGNAL(focused(SessionController*)) , this , SIGNAL(activeViewChanged(SessionController*)) );
|
||||
connect( session , SIGNAL(destroyed()) , controller , SLOT(deleteLater()) );
|
||||
connect( view , SIGNAL(destroyed()) , controller , SLOT(deleteLater()) );
|
||||
|
||||
connect( controller , SIGNAL(sendInputToAll(bool)) , this , SLOT(sendInputToAll()) );
|
||||
|
||||
return controller;
|
||||
}
|
||||
|
||||
@@ -644,6 +648,22 @@ QList<ViewProperties*> ViewManager::viewProperties() const
|
||||
return list;
|
||||
}
|
||||
|
||||
void ViewManager::sendInputToAll()
|
||||
{
|
||||
SessionGroup* group = new SessionGroup();
|
||||
group->setMasterMode( SessionGroup::CopyInputToAll );
|
||||
|
||||
Session* activeSession = _sessionMap[qobject_cast<TerminalDisplay*>(activeView())];
|
||||
if ( activeSession != 0 )
|
||||
{
|
||||
QListIterator<Session*> iter( SessionManager::instance()->sessions() );
|
||||
while ( iter.hasNext() )
|
||||
group->addSession(iter.next());
|
||||
|
||||
group->setMasterStatus(activeSession,true);
|
||||
}
|
||||
}
|
||||
|
||||
uint qHash(QPointer<TerminalDisplay> display)
|
||||
{
|
||||
return qHash((TerminalDisplay*)display);
|
||||
|
||||
Reference in New Issue
Block a user