mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-08-12 20:55:39 +08:00
refs #129 , updated GUI to play notification sounds:
* prepared for login/off sounds * prepared for text message sounds * helper method to play sounds * enabled mute / mixer also in cockpit, including context menus * settings for notification sounds * some minor tweaks, e.g. changed signal/slot to C++ style where missing
This commit is contained in:
@@ -215,7 +215,6 @@ void MainWindow::toggleNetworkConnection()
|
||||
mode = INetwork::LoginAsObserver;
|
||||
this->displayStatusMessage(CStatusMessage::getInfoMessage("login in observer mode"));
|
||||
}
|
||||
|
||||
msgs = this->m_contextNetwork->connectToNetwork(static_cast<uint>(mode));
|
||||
}
|
||||
else
|
||||
@@ -296,6 +295,22 @@ void MainWindow::connectionStatusChanged(uint /** from **/, uint to)
|
||||
this->startUpdateTimers();
|
||||
else if (newStatus == INetwork::Disconnecting || newStatus == INetwork::Disconnected || newStatus == INetwork::DisconnectedError)
|
||||
this->stopUpdateTimers();
|
||||
|
||||
// sounds
|
||||
switch (newStatus)
|
||||
{
|
||||
case INetwork::Connected:
|
||||
this->playNotifcationSound(BlackSound::CSoundGenerator::NotificationLogin);
|
||||
break;
|
||||
case INetwork::Disconnected:
|
||||
this->playNotifcationSound(BlackSound::CSoundGenerator::NotificationLogoff);
|
||||
break;
|
||||
case INetwork::DisconnectedError:
|
||||
this->playNotifcationSound(BlackSound::CSoundGenerator::NotificationError);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user