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(showNetworkConfig(NetworkId)), SLOT(showNetworkConfig(NetworkId)));
connect(GraphicalUi::contextMenuActionProvider(), SIGNAL(showIgnoreList(QString)), SLOT(showIgnoreList(QString)));
connect(Client::instance(), SIGNAL(showIgnoreList(QString)), SLOT(showIgnoreList(QString)));
}
+void MainWin::showNetworkConfig(NetworkId netId)
+{
+ SettingsPageDlg dlg(new NetworksSettingsPage(this), this);
+ if (netId.isValid())
+ qobject_cast<NetworksSettingsPage *>(dlg.currentPage())->bufferList_Open(netId);
+ dlg.exec();
+}
+
+
void MainWin::showIgnoreList(QString newRule)
{
SettingsPageDlg dlg(new IgnoreListSettingsPage(this), this);
void messagesInserted(const QModelIndex &parent, int start, int end);
void showAboutDlg();
void showChannelList(NetworkId netId = NetworkId());
+ void showNetworkConfig(NetworkId netId = NetworkId());
void showCoreConnectionDlg();
void showCoreConfigWizard(const QVariantList &, const QVariantList &);
void showCoreInfoDlg();
}
+// Called when selecting 'Configure' from the buffer list
+void NetworksSettingsPage::bufferList_Open(NetworkId netId)
+{
+ QListWidgetItem *item = networkItem(netId);
+ ui.networkList->setCurrentItem(item, QItemSelectionModel::SelectCurrent);
+}
+
+
void NetworksSettingsPage::displayNetwork(NetworkId id)
{
_ignoreWidgetChanges = true;
public slots:
void save();
void load();
+ void bufferList_Open(NetworkId);
private slots:
void widgetHasChanged();
registerAction(HideBufferTemporarily, tr("Hide Chat(s) Temporarily"));
registerAction(HideBufferPermanently, tr("Hide Chat(s) Permanently"));
registerAction(ShowChannelList, tr("Show Channel List"));
+ registerAction(ShowNetworkConfig, tr("Configure"));
registerAction(ShowIgnoreList, tr("Show Ignore List"));
QMenu *hideEventsMenu = new QMenu();
if (!network)
return;
+ addAction(ShowNetworkConfig, menu, index);
+ menu->addSeparator();
addAction(NetworkConnect, menu, network->connectionState() == Network::Disconnected);
addAction(NetworkDisconnect, menu, network->connectionState() != Network::Disconnected);
menu->addSeparator();
if (networkId.isValid())
emit showChannelList(networkId);
break;
+ case ShowNetworkConfig:
+ if (networkId.isValid())
+ emit showNetworkConfig(networkId);
+ break;
case ShowIgnoreList:
if (networkId.isValid())
emit showIgnoreList(QString());
JoinChannel = 0x1000,
ShowChannelList = 0x2000,
ShowIgnoreList = 0x3000,
+ ShowNetworkConfig = 0x4000,
// Nick actions
NickMask = 0xff0000,
signals:
void showChannelList(NetworkId);
+ void showNetworkConfig(NetworkId);
void showIgnoreList(QString);
protected: