Changeset View
Changeset View
Standalone View
Standalone View
src/SessionController.cpp
Show First 20 Lines • Show All 1519 Lines • ▼ Show 20 Line(s) | 1519 | { | |||
---|---|---|---|---|---|
1520 | _session->setMonitorActivity(monitor); | 1520 | _session->setMonitorActivity(monitor); | ||
1521 | } | 1521 | } | ||
1522 | void SessionController::monitorSilence(bool monitor) | 1522 | void SessionController::monitorSilence(bool monitor) | ||
1523 | { | 1523 | { | ||
1524 | _session->setMonitorSilence(monitor); | 1524 | _session->setMonitorSilence(monitor); | ||
1525 | } | 1525 | } | ||
1526 | void SessionController::updateSessionIcon() | 1526 | void SessionController::updateSessionIcon() | ||
1527 | { | 1527 | { | ||
1528 | // If the default profile icon is being used, don't put it on the tab | ||||
1529 | // Only show the icon if the user specifically chose one | ||||
1530 | if (_session->iconName() == QStringLiteral("utilities-terminal")) { | ||||
1531 | _sessionIconName = QStringLiteral(""); | ||||
hindenburg: For empty strings use QString() | |||||
1532 | } else { | ||||
1533 | _sessionIconName = _session->iconName(); | ||||
1534 | } | ||||
1535 | _sessionIcon = QIcon::fromTheme(_sessionIconName); | ||||
1536 | | ||||
1528 | // Visualize that the session is broadcasting to others | 1537 | // Visualize that the session is broadcasting to others | ||
1529 | if ((_copyToGroup != nullptr) && _copyToGroup->sessions().count() > 1) { | 1538 | if ((_copyToGroup != nullptr) && _copyToGroup->sessions().count() > 1) { | ||
1530 | // Master Mode: set different icon, to warn the user to be careful | 1539 | // Master Mode: set different icon, to warn the user to be careful | ||
1531 | setIcon(*_broadcastIcon); | 1540 | setIcon(*_broadcastIcon); | ||
1532 | } else { | 1541 | } else { | ||
1533 | if (!_keepIconUntilInteraction) { | 1542 | if (!_keepIconUntilInteraction) { | ||
1534 | // Not in Master Mode: use normal icon | 1543 | // Not in Master Mode: use normal icon | ||
1535 | setIcon(_sessionIcon); | 1544 | setIcon(_sessionIcon); | ||
▲ Show 20 Lines • Show All 41 Lines • ▼ Show 20 Line(s) | 1583 | { | |||
1577 | } else { | 1586 | } else { | ||
1578 | return false; | 1587 | return false; | ||
1579 | } | 1588 | } | ||
1580 | } | 1589 | } | ||
1581 | 1590 | | |||
1582 | void SessionController::sessionAttributeChanged() | 1591 | void SessionController::sessionAttributeChanged() | ||
1583 | { | 1592 | { | ||
1584 | if (_sessionIconName != _session->iconName()) { | 1593 | if (_sessionIconName != _session->iconName()) { | ||
1585 | _sessionIconName = _session->iconName(); | | |||
1586 | _sessionIcon = QIcon::fromTheme(_sessionIconName); | | |||
1587 | updateSessionIcon(); | 1594 | updateSessionIcon(); | ||
1588 | } | 1595 | } | ||
1589 | 1596 | | |||
1590 | QString title = _session->title(Session::DisplayedTitleRole); | 1597 | QString title = _session->title(Session::DisplayedTitleRole); | ||
1591 | 1598 | | |||
1592 | // special handling for the "%w" marker which is replaced with the | 1599 | // special handling for the "%w" marker which is replaced with the | ||
1593 | // window title set by the shell | 1600 | // window title set by the shell | ||
1594 | title.replace(QLatin1String("%w"), _session->userTitle()); | 1601 | title.replace(QLatin1String("%w"), _session->userTitle()); | ||
▲ Show 20 Lines • Show All 108 Lines • ▼ Show 20 Line(s) | 1708 | if (state == NOTIFYACTIVITY) { | |||
1703 | _keepIconUntilInteraction = true; | 1710 | _keepIconUntilInteraction = true; | ||
1704 | } else if (state == NOTIFYSILENCE) { | 1711 | } else if (state == NOTIFYSILENCE) { | ||
1705 | setIcon(*_silenceIcon); | 1712 | setIcon(*_silenceIcon); | ||
1706 | _keepIconUntilInteraction = true; | 1713 | _keepIconUntilInteraction = true; | ||
1707 | } else if (state == NOTIFYBELL) { | 1714 | } else if (state == NOTIFYBELL) { | ||
1708 | setIcon(*_bellIcon); | 1715 | setIcon(*_bellIcon); | ||
1709 | _keepIconUntilInteraction = true; | 1716 | _keepIconUntilInteraction = true; | ||
1710 | } else if (state == NOTIFYNORMAL) { | 1717 | } else if (state == NOTIFYNORMAL) { | ||
1711 | if (_sessionIconName != _session->iconName()) { | | |||
1712 | _sessionIconName = _session->iconName(); | | |||
1713 | _sessionIcon = QIcon::fromTheme(_sessionIconName); | | |||
1714 | } | | |||
1715 | | ||||
1716 | updateSessionIcon(); | 1718 | updateSessionIcon(); | ||
1717 | } | 1719 | } | ||
1718 | 1720 | | |||
1719 | _previousState = state; | 1721 | _previousState = state; | ||
1720 | } | 1722 | } | ||
1721 | 1723 | | |||
1722 | void SessionController::zmodemDownload() | 1724 | void SessionController::zmodemDownload() | ||
1723 | { | 1725 | { | ||
▲ Show 20 Lines • Show All 65 Lines • Show Last 20 Lines |
For empty strings use QString()