Showing the changes to interface/src/Application.cpp (1 of 139 files). Show all
Unified · Split
| @@ -246,7 +246,8 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 245 unmodified lines | ||
| 246 | 246 | connect(&domainHandler, SIGNAL(connectedToDomain(const QString&)), SLOT(updateWindowTitle())); |
| 247 | 247 | connect(&domainHandler, SIGNAL(disconnectedFromDomain()), SLOT(updateWindowTitle())); |
| 248 | 248 | connect(&domainHandler, &DomainHandler::settingsReceived, this, &Application::domainSettingsReceived); |
| 249 | − | |
| 249 | + connect(&domainHandler, &DomainHandler::hostnameChanged, Menu::getInstance(), &Menu::clearLoginDialogDisplayedFlag); | |
| 250 | + | |
| 250 | 251 | // hookup VoxelEditSender to PaymentManager so we can pay for octree edits |
| 251 | 252 | const PaymentManager& paymentManager = PaymentManager::getInstance(); |
| 252 | 253 | connect(&_voxelEditSender, &VoxelEditPacketSender::octreePaymentRequired, |
| @@ -894,7 +895,7 @@ void Application::keyPressEvent(QKeyEvent* event) { · 641 unmodified lines | ||
| 894 | 895 | } |
| 895 | 896 | break; |
| 896 | 897 | |
| 897 | − case Qt::Key_Space: | |
| 898 | + case Qt::Key_Apostrophe: | |
| 898 | 899 | resetSensors(); |
| 899 | 900 | break; |
| 900 | 901 | |
| @@ -1053,7 +1054,6 @@ void Application::keyPressEvent(QKeyEvent* event) { · 152 unmodified lines | ||
| 1053 | 1054 | Menu::getInstance()->triggerOption(MenuOption::FrustumRenderMode); |
| 1054 | 1055 | } |
| 1055 | 1056 | break; |
| 1056 | − break; | |
| 1057 | 1057 | case Qt::Key_Percent: |
| 1058 | 1058 | Menu::getInstance()->triggerOption(MenuOption::Stats); |
| 1059 | 1059 | break; |
| @@ -1772,14 +1772,7 @@ void Application::init() { · 712 unmodified lines | ||
| 1772 | 1772 | _lastTimeUpdated.start(); |
| 1773 | 1773 | |
| 1774 | 1774 | Menu::getInstance()->loadSettings(); |
| 1775 | − if (Menu::getInstance()->getAudioJitterBufferFrames() != 0) { | |
| 1776 | − _audio.setDynamicJitterBuffers(false); | |
| 1777 | − _audio.setStaticDesiredJitterBufferFrames(Menu::getInstance()->getAudioJitterBufferFrames()); | |
| 1778 | − } else { | |
| 1779 | − _audio.setDynamicJitterBuffers(true); | |
| 1780 | − } | |
| 1781 | − | |
| 1782 | − _audio.setMaxFramesOverDesired(Menu::getInstance()->getMaxFramesOverDesired()); | |
| 1775 | + _audio.setReceivedAudioStreamSettings(Menu::getInstance()->getReceivedAudioStreamSettings()); | |
| 1783 | 1776 | |
| 1784 | 1777 | qDebug("Loaded settings"); |
| 1785 | 1778 | |
| @@ -3747,6 +3740,10 @@ ScriptEngine* Application::loadScript(const QString& scriptName, bool loadScript · 1961 unmodified lines | ||
| 3747 | 3740 | scriptEngine->registerGlobalObject("Camera", cameraScriptable); |
| 3748 | 3741 | connect(scriptEngine, SIGNAL(finished(const QString&)), cameraScriptable, SLOT(deleteLater())); |
| 3749 | 3742 | |
| 3743 | +#ifdef Q_OS_MAC | |
| 3744 | + scriptEngine->registerGlobalObject("SpeechRecognizer", Menu::getInstance()->getSpeechRecognizer()); | |
| 3745 | +#endif | |
| 3746 | + | |
| 3750 | 3747 | ClipboardScriptingInterface* clipboardScriptable = new ClipboardScriptingInterface(); |
| 3751 | 3748 | scriptEngine->registerGlobalObject("Clipboard", clipboardScriptable); |
| 3752 | 3749 | connect(scriptEngine, SIGNAL(finished(const QString&)), clipboardScriptable, SLOT(deleteLater())); |
| @@ -3829,6 +3826,10 @@ void Application::stopAllScripts(bool restart) { · 76 unmodified lines | ||
| 3829 | 3826 | it.value()->stop(); |
| 3830 | 3827 | qDebug() << "stopping script..." << it.key(); |
| 3831 | 3828 | } |
| 3829 | + // HACK: ATM scripts cannot set/get their animation priorities, so we clear priorities | |
| 3830 | + // whenever a script stops in case it happened to have been setting joint rotations. | |
| 3831 | + // TODO: expose animation priorities and provide a layered animation control system. | |
| 3832 | + _myAvatar->clearJointAnimationPriorities(); | |
| 3832 | 3833 | } |
| 3833 | 3834 | |
| 3834 | 3835 | void Application::stopScript(const QString &scriptName) { |
| @@ -3836,6 +3837,10 @@ void Application::stopScript(const QString &scriptName) { · 1 unmodified line | ||
| 3836 | 3837 | if (_scriptEnginesHash.contains(scriptURLString)) { |
| 3837 | 3838 | _scriptEnginesHash.value(scriptURLString)->stop(); |
| 3838 | 3839 | qDebug() << "stopping script..." << scriptName; |
| 3840 | + // HACK: ATM scripts cannot set/get their animation priorities, so we clear priorities | |
| 3841 | + // whenever a script stops in case it happened to have been setting joint rotations. | |
| 3842 | + // TODO: expose animation priorities and provide a layered animation control system. | |
| 3843 | + _myAvatar->clearJointAnimationPriorities(); | |
| 3839 | 3844 | } |
| 3840 | 3845 | } |
| 3841 | 3846 | |