show link to IRC in place of Qxmpp removal

This commit is contained in:
Stephen Birarda 2015-03-03 12:17:35 -08:00
parent 03de43d451
commit a961cd8ff3
3 changed files with 22 additions and 2 deletions

View file

@ -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,

View file

@ -9,6 +9,8 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include <QMessageBox>
#include <AccountManager.h>
#include <MainWindow.h>
#include <PathUtils.h>
@ -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.<br/><br/>Web chat is available at <a href='http://webchat.freenode.net/?channels=highfidelity&uio=d4'>http://webchat.freenode.net/?channels=highfidelity&uio=d4</a>",
QMessageBox::Ok);
_ircInfoBox->setTextFormat(Qt::RichText);
_ircInfoBox->setAttribute(Qt::WA_DeleteOnClose);
_ircInfoBox->show();
}
_ircInfoBox->raise();
}

View file

@ -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> _attachmentsDialog;
QPointer<BandwidthDialog> _bandwidthDialog;
QPointer<CachesSizeDialog> _cachesSizeDialog;
QPointer<ChatWindow> _chatWindow;
QPointer<QMessageBox> _ircInfoBox;
QPointer<HMDToolsDialog> _hmdToolsDialog;
QPointer<LodToolsDialog> _lodToolsDialog;
QPointer<LoginDialog> _loginDialog;