mirror of
https://github.com/KDE/konsole.git
synced 2026-06-18 18:58:58 -04:00
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
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user