Commit cfa42fd5 authored by Kurt Hindenburg's avatar Kurt Hindenburg

Change icon to better visualize master mode for 'Copy Input To..'.

Thanks to Thomas Dreibholz <dreibh@iem.uni-due.de> for patch on reviewboard.


svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1016850
parent 2af04206
......@@ -212,9 +212,11 @@ void SessionController::snapshot()
QString title = _session->getDynamicTitle();
title = title.simplified();
// crude indicator when the session is broadcasting to others
if (_copyToGroup && _copyToGroup->sessions().count() > 1)
// Visualize that the session is broadcasting to others
if (_copyToGroup && _copyToGroup->sessions().count() > 1) {
title.append('*');
}
updateSessionIcon();
// apply new title
if ( !title.isEmpty() )
......@@ -935,13 +937,25 @@ void SessionController::monitorSilence(bool monitor)
{
_session->setMonitorSilence(monitor);
}
void SessionController::updateSessionIcon()
{
// Visualize that the session is broadcasting to others
if (_copyToGroup && _copyToGroup->sessions().count() > 1) {
// Master Mode: set different icon, to warn the user to be careful
setIcon(KIcon("emblem-important"));
}
else {
// Not in Master Mode: use normal icon
setIcon( _sessionIcon );
}
}
void SessionController::sessionTitleChanged()
{
if ( _sessionIconName != _session->iconName() )
{
_sessionIconName = _session->iconName();
_sessionIcon = KIcon( _sessionIconName );
setIcon( _sessionIcon );
updateSessionIcon();
}
QString title = _session->title(Session::DisplayedTitleRole);
......@@ -1040,7 +1054,7 @@ void SessionController::sessionStateChanged(int state)
_sessionIcon = KIcon( _sessionIconName );
}
setIcon( _sessionIcon );
updateSessionIcon();
}
}
......
......@@ -225,6 +225,8 @@ private:
void listenForScreenWindowUpdates();
private:
void updateSessionIcon();
QPointer<Session> _session;
QPointer<TerminalDisplay> _view;
SessionGroup* _copyToGroup;
......
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