ui.highlightNicksComboBox->addItem(tr("Current Nick"), QVariant(HighlightRuleManager::CurrentNick));
ui.highlightNicksComboBox->addItem(tr("None"), QVariant(HighlightRuleManager::NoNick));
+ coreConnectionStateChanged(Client::isConnected()); // need a core connection!
+ connect(Client::instance(), SIGNAL(coreConnectionStateChanged(bool)), this, SLOT(coreConnectionStateChanged(bool)));
+
connect(ui.highlightAdd, SIGNAL(clicked(bool)), this, SLOT(addNewHighlightRow()));
connect(ui.highlightRemove, SIGNAL(clicked(bool)), this, SLOT(removeSelectedHighlightRows()));
connect(Client::instance(), SIGNAL(connected()), this, SLOT(clientConnected()));
}
+void CoreHighlightSettingsPage::coreConnectionStateChanged(bool state)
+{
+ setEnabled(state);
+ if (state) {
+ load();
+ } else {
+ revert();
+ }
+}
+
void CoreHighlightSettingsPage::setupRuleTable(QTableWidget *table) const
{
table->verticalHeader()->hide();
void clientConnected();
private slots:
+ void coreConnectionStateChanged(bool state);
void widgetHasChanged();
void addNewHighlightRow(bool enable = true, const QString &name = tr("highlight rule"), bool regex = false,
bool cs = false, const QString &sender = "", const QString &chanName = "",