diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 9c523f53e8..441db9b7b3 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -1418,11 +1418,11 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo connect(DependencyManager::get().data(), &AudioClient::mutedByMixer, this, onMutedByMixer); // Track when the address bar is opened - auto onAddressBarToggled = [this]() { + auto onAddressBarShown = [this]() { // Record time UserActivityLogger::getInstance().logAction("opened_address_bar", { { "uptime_ms", _sessionRunTimer.elapsed() } }); }; - connect(DependencyManager::get().data(), &DialogsManager::addressBarToggled, this, onAddressBarToggled); + connect(DependencyManager::get().data(), &DialogsManager::addressBarShown, this, onAddressBarShown); // Make sure we don't time out during slow operations at startup updateHeartbeat(); diff --git a/interface/src/scripting/DialogsManagerScriptingInterface.cpp b/interface/src/scripting/DialogsManagerScriptingInterface.cpp index f1c96b4309..0fb6078290 100644 --- a/interface/src/scripting/DialogsManagerScriptingInterface.cpp +++ b/interface/src/scripting/DialogsManagerScriptingInterface.cpp @@ -16,8 +16,6 @@ #include "ui/DialogsManager.h" DialogsManagerScriptingInterface::DialogsManagerScriptingInterface() { - connect(DependencyManager::get().data(), &DialogsManager::addressBarToggled, - this, &DialogsManagerScriptingInterface::addressBarToggled); connect(DependencyManager::get().data(), &DialogsManager::addressBarShown, this, &DialogsManagerScriptingInterface::addressBarShown); } @@ -28,11 +26,6 @@ DialogsManagerScriptingInterface* DialogsManagerScriptingInterface::getInstance( return &sharedInstance; } -void DialogsManagerScriptingInterface::toggleAddressBar() { - QMetaObject::invokeMethod(DependencyManager::get().data(), - "toggleAddressBar", Qt::QueuedConnection); -} - void DialogsManagerScriptingInterface::showAddressBar() { QMetaObject::invokeMethod(DependencyManager::get().data(), "showAddressBar", Qt::QueuedConnection); diff --git a/interface/src/scripting/DialogsManagerScriptingInterface.h b/interface/src/scripting/DialogsManagerScriptingInterface.h index aa231afb4a..e4dd18aedf 100644 --- a/interface/src/scripting/DialogsManagerScriptingInterface.h +++ b/interface/src/scripting/DialogsManagerScriptingInterface.h @@ -22,12 +22,10 @@ public: Q_INVOKABLE void showFeed(); public slots: - void toggleAddressBar(); void showAddressBar(); void hideAddressBar(); signals: - void addressBarToggled(); void addressBarShown(bool visible); }; diff --git a/interface/src/ui/DialogsManager.cpp b/interface/src/ui/DialogsManager.cpp index c5932aae07..96b5da3a55 100644 --- a/interface/src/ui/DialogsManager.cpp +++ b/interface/src/ui/DialogsManager.cpp @@ -46,42 +46,6 @@ void DialogsManager::maybeCreateDialog(QPointer& member) { } } -void DialogsManager::toggleAddressBar() { - auto hmd = DependencyManager::get(); - auto tabletScriptingInterface = DependencyManager::get(); - auto tablet = dynamic_cast(tabletScriptingInterface->getTablet("com.highfidelity.interface.tablet.system")); - if (tablet->getToolbarMode()) { - if (tablet->isPathLoaded(TABLET_ADDRESS_DIALOG)) { - tablet->gotoHomeScreen(); - emit addressBarToggled(); - } else { - tablet->loadQMLSource(TABLET_ADDRESS_DIALOG); - emit addressBarToggled(); - } - } else { - if (hmd->getShouldShowTablet()) { - if (tablet->isPathLoaded(TABLET_ADDRESS_DIALOG) && _closeAddressBar) { - tablet->gotoHomeScreen(); - hmd->closeTablet(); - _closeAddressBar = false; - emit addressBarToggled(); - } else { - tablet->loadQMLSource(TABLET_ADDRESS_DIALOG); - qApp->setKeyboardFocusOverlay(hmd->getCurrentTabletScreenID()); - _closeAddressBar = true; - emit addressBarToggled(); - } - } else { - tablet->loadQMLSource(TABLET_ADDRESS_DIALOG); - hmd->openTablet(); - qApp->setKeyboardFocusOverlay(hmd->getCurrentTabletScreenID()); - _closeAddressBar = true; - emit addressBarToggled(); - } - - } -} - void DialogsManager::showAddressBar() { auto hmd = DependencyManager::get(); auto tabletScriptingInterface = DependencyManager::get(); diff --git a/interface/src/ui/DialogsManager.h b/interface/src/ui/DialogsManager.h index 76c4f083d2..3a40b15a3b 100644 --- a/interface/src/ui/DialogsManager.h +++ b/interface/src/ui/DialogsManager.h @@ -41,7 +41,6 @@ public: void emitAddressBarShown(bool visible) { emit addressBarShown(visible); } public slots: - void toggleAddressBar(); void showAddressBar(); void hideAddressBar(); void showFeed(); @@ -58,7 +57,6 @@ public slots: void showUpdateDialog(); signals: - void addressBarToggled(); void addressBarShown(bool visible); void setUseFeed(bool useFeed);