From a961cd8ff3910bbe892aea62014bf4cbef52470d Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Tue, 3 Mar 2015 12:17:35 -0800 Subject: [PATCH] show link to IRC in place of Qxmpp removal --- interface/src/Menu.cpp | 3 +++ interface/src/ui/DialogsManager.cpp | 16 ++++++++++++++++ interface/src/ui/DialogsManager.h | 5 +++-- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/interface/src/Menu.cpp b/interface/src/Menu.cpp index 10f5d8f531..639a88f65f 100644 --- a/interface/src/Menu.cpp +++ b/interface/src/Menu.cpp @@ -161,6 +161,9 @@ Menu::Menu() { SLOT(setEnabled(bool))); connect(speechRecognizer.data(), SIGNAL(enabledUpdated(bool)), speechRecognizerAction, SLOT(setChecked(bool))); #endif + + addActionToQMenuAndActionHash(toolsMenu, MenuOption::Chat, Qt::Key_Backslash, + dialogsManager.data(), SLOT(showIRCLink())); addActionToQMenuAndActionHash(toolsMenu, MenuOption::ToolWindow, diff --git a/interface/src/ui/DialogsManager.cpp b/interface/src/ui/DialogsManager.cpp index 28920fd13e..8a33c0e827 100644 --- a/interface/src/ui/DialogsManager.cpp +++ b/interface/src/ui/DialogsManager.cpp @@ -9,6 +9,8 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // +#include + #include #include #include @@ -160,3 +162,17 @@ void DialogsManager::showScriptEditor() { maybeCreateDialog(_scriptEditor); _scriptEditor->raise(); } + +void DialogsManager::showIRCLink() { + if (!_ircInfoBox) { + _ircInfoBox = new QMessageBox(QMessageBox::NoIcon, + "High Fidelity IRC", + "High Fidelity has an IRC channel on irc.freenode.net at #highfidelity.

Web chat is available at http://webchat.freenode.net/?channels=highfidelity&uio=d4", + QMessageBox::Ok); + _ircInfoBox->setTextFormat(Qt::RichText); + _ircInfoBox->setAttribute(Qt::WA_DeleteOnClose); + _ircInfoBox->show(); + } + + _ircInfoBox->raise(); +} diff --git a/interface/src/ui/DialogsManager.h b/interface/src/ui/DialogsManager.h index 59af539540..1e083431ba 100644 --- a/interface/src/ui/DialogsManager.h +++ b/interface/src/ui/DialogsManager.h @@ -25,7 +25,6 @@ class AddressBarDialog; class AnimationsDialog; class AttachmentsDialog; class CachesSizeDialog; -class ChatWindow; class BandwidthDialog; class LodToolsDialog; class LoginDialog; @@ -34,6 +33,7 @@ class MetavoxelNetworkSimulator; class OctreeStatsDialog; class PreferencesDialog; class ScriptEditorWindow; +class QMessageBox; class DialogsManager : public QObject, public Dependency { Q_OBJECT @@ -60,6 +60,7 @@ public slots: void showMetavoxelEditor(); void showMetavoxelNetworkSimulator(); void showScriptEditor(); + void showIRCLink(); private slots: void toggleToolWindow(); @@ -87,7 +88,7 @@ private: QPointer _attachmentsDialog; QPointer _bandwidthDialog; QPointer _cachesSizeDialog; - QPointer _chatWindow; + QPointer _ircInfoBox; QPointer _hmdToolsDialog; QPointer _lodToolsDialog; QPointer _loginDialog;