mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Entirely remove addressBarToggle()
This commit is contained in:
parent
7a7cfb84e5
commit
e6edce5352
5 changed files with 2 additions and 49 deletions
|
@ -1418,11 +1418,11 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
|||
connect(DependencyManager::get<AudioClient>().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<DialogsManager>().data(), &DialogsManager::addressBarToggled, this, onAddressBarToggled);
|
||||
connect(DependencyManager::get<DialogsManager>().data(), &DialogsManager::addressBarShown, this, onAddressBarShown);
|
||||
|
||||
// Make sure we don't time out during slow operations at startup
|
||||
updateHeartbeat();
|
||||
|
|
|
@ -16,8 +16,6 @@
|
|||
#include "ui/DialogsManager.h"
|
||||
|
||||
DialogsManagerScriptingInterface::DialogsManagerScriptingInterface() {
|
||||
connect(DependencyManager::get<DialogsManager>().data(), &DialogsManager::addressBarToggled,
|
||||
this, &DialogsManagerScriptingInterface::addressBarToggled);
|
||||
connect(DependencyManager::get<DialogsManager>().data(), &DialogsManager::addressBarShown,
|
||||
this, &DialogsManagerScriptingInterface::addressBarShown);
|
||||
}
|
||||
|
@ -28,11 +26,6 @@ DialogsManagerScriptingInterface* DialogsManagerScriptingInterface::getInstance(
|
|||
return &sharedInstance;
|
||||
}
|
||||
|
||||
void DialogsManagerScriptingInterface::toggleAddressBar() {
|
||||
QMetaObject::invokeMethod(DependencyManager::get<DialogsManager>().data(),
|
||||
"toggleAddressBar", Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
void DialogsManagerScriptingInterface::showAddressBar() {
|
||||
QMetaObject::invokeMethod(DependencyManager::get<DialogsManager>().data(),
|
||||
"showAddressBar", Qt::QueuedConnection);
|
||||
|
|
|
@ -22,12 +22,10 @@ public:
|
|||
Q_INVOKABLE void showFeed();
|
||||
|
||||
public slots:
|
||||
void toggleAddressBar();
|
||||
void showAddressBar();
|
||||
void hideAddressBar();
|
||||
|
||||
signals:
|
||||
void addressBarToggled();
|
||||
void addressBarShown(bool visible);
|
||||
};
|
||||
|
||||
|
|
|
@ -46,42 +46,6 @@ void DialogsManager::maybeCreateDialog(QPointer<T>& member) {
|
|||
}
|
||||
}
|
||||
|
||||
void DialogsManager::toggleAddressBar() {
|
||||
auto hmd = DependencyManager::get<HMDScriptingInterface>();
|
||||
auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
|
||||
auto tablet = dynamic_cast<TabletProxy*>(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<HMDScriptingInterface>();
|
||||
auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue