From 928af86f954aaa925b35505957faced2ea5ac964 Mon Sep 17 00:00:00 2001 From: Janne Koschinski Date: Fri, 22 Dec 2017 02:39:43 +0100 Subject: [PATCH] Make /list open the Channel List dialog --- src/client/client.h | 1 + src/client/clientuserinputhandler.cpp | 5 +++++ src/client/clientuserinputhandler.h | 1 + src/qtui/mainwin.cpp | 1 + 4 files changed, 8 insertions(+) diff --git a/src/client/client.h b/src/client/client.h index 6732d595..a7e6c2c2 100644 --- a/src/client/client.h +++ b/src/client/client.h @@ -165,6 +165,7 @@ signals: void requestNetworkStates(); void showConfigWizard(const QVariantMap &coredata); + void showChannelList(NetworkId networkId); void showIgnoreList(QString ignoreRule); void connected(); diff --git a/src/client/clientuserinputhandler.cpp b/src/client/clientuserinputhandler.cpp index 8af827da..561eb3d8 100644 --- a/src/client/clientuserinputhandler.cpp +++ b/src/client/clientuserinputhandler.cpp @@ -140,6 +140,11 @@ void ClientUserInputHandler::handleIgnore(const BufferInfo &bufferInfo, const QS ); } +void ClientUserInputHandler::handleList(const BufferInfo &bufferInfo, const QString &text) +{ + emit Client::instance()->showChannelList(bufferInfo.networkId()); +} + void ClientUserInputHandler::switchBuffer(const NetworkId &networkId, const QString &bufferName) { diff --git a/src/client/clientuserinputhandler.h b/src/client/clientuserinputhandler.h index 391a94a7..5f7721ac 100644 --- a/src/client/clientuserinputhandler.h +++ b/src/client/clientuserinputhandler.h @@ -46,6 +46,7 @@ private slots: void handleJoin(const BufferInfo &bufferInfo, const QString &text); void handleQuery(const BufferInfo &bufferInfo, const QString &text); void handleIgnore(const BufferInfo &bufferInfo, const QString &text); + void handleList(const BufferInfo &bufferInfo, const QString &text); void defaultHandler(const QString &cmd, const BufferInfo &bufferInfo, const QString &text); private: diff --git a/src/qtui/mainwin.cpp b/src/qtui/mainwin.cpp index d41f087b..7854d89a 100644 --- a/src/qtui/mainwin.cpp +++ b/src/qtui/mainwin.cpp @@ -203,6 +203,7 @@ void MainWin::init() connect(Client::messageModel(), SIGNAL(rowsInserted(const QModelIndex &, int, int)), SLOT(messagesInserted(const QModelIndex &, int, int))); connect(GraphicalUi::contextMenuActionProvider(), SIGNAL(showChannelList(NetworkId)), SLOT(showChannelList(NetworkId))); + connect(Client::instance(), SIGNAL(showChannelList(NetworkId)), SLOT(showChannelList(NetworkId))); connect(GraphicalUi::contextMenuActionProvider(), SIGNAL(showIgnoreList(QString)), SLOT(showIgnoreList(QString))); connect(Client::instance(), SIGNAL(showIgnoreList(QString)), SLOT(showIgnoreList(QString))); -- 2.20.1