X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fsettingspages%2Fhighlightsettingspage.cpp;h=4a9b11daa4f83623a52be7a89a0075aa613be0ca;hp=af0af1f28615f4990cd0578c7921df1251ba3f09;hb=HEAD;hpb=ec747d2e6065e645e2cd768abc84923ef6a19705 diff --git a/src/qtui/settingspages/highlightsettingspage.cpp b/src/qtui/settingspages/highlightsettingspage.cpp index af0af1f2..53a1fd92 100644 --- a/src/qtui/settingspages/highlightsettingspage.cpp +++ b/src/qtui/settingspages/highlightsettingspage.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2019 by the Quassel Project * + * Copyright (C) 2005-2022 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -31,9 +31,7 @@ #include "uisettings.h" HighlightSettingsPage::HighlightSettingsPage(QWidget* parent) - : SettingsPage(tr("Interface"), - // In Monolithic mode, local highlights are replaced by remote highlights - Quassel::runMode() == Quassel::Monolithic ? tr("Legacy Highlights") : tr("Local Highlights"), + : SettingsPage(tr("Interface"), tr("Legacy Highlights"), parent) { ui.setupUi(this); @@ -83,22 +81,11 @@ HighlightSettingsPage::HighlightSettingsPage(QWidget* parent) ui.highlightTable->horizontalHeader()->setSectionResizeMode(HighlightSettingsPage::ChanColumn, QHeaderView::ResizeToContents); // Information icon - ui.localHighlightsIcon->setPixmap(icon::get("dialog-information").pixmap(16)); - - // Set up client/monolithic local highlights information - if (Quassel::runMode() == Quassel::Monolithic) { - // We're running in Monolithic mode, core/client version in total sync. Discourage the use - // of local (legacy) highlights as it's identical to setting remote highlights. - ui.localHighlightsLabel->setText(tr("Legacy Highlights are replaced by Highlights")); - } - else { - // We're running in client/split mode, allow for splitting the details. - ui.localHighlightsLabel->setText(tr("Local Highlights apply to this device only")); - } + ui.localHighlightsIcon->setPixmap(icon::get({"emblem-information", "dialog-information"}).pixmap(16)); connect(ui.add, &QAbstractButton::clicked, this, [this]() { addNewRow(); }); connect(ui.remove, &QAbstractButton::clicked, this, &HighlightSettingsPage::removeSelectedRows); - // TODO: search for a better signal (one that emits everytime a selection has been changed for one item) + // TODO: search for a better signal (one that emits every time a selection has been changed for one item) connect(ui.highlightTable, &QTableWidget::itemClicked, this, &HighlightSettingsPage::selectRow); connect(ui.highlightAllNicks, &QAbstractButton::clicked, this, &HighlightSettingsPage::widgetHasChanged); @@ -117,7 +104,7 @@ bool HighlightSettingsPage::hasDefaults() const void HighlightSettingsPage::defaults() { - ui.highlightCurrentNick->setChecked(true); + ui.highlightNoNick->setChecked(true); ui.nicksCaseSensitive->setChecked(false); emptyTable(); @@ -265,34 +252,16 @@ void HighlightSettingsPage::tableChanged(QTableWidgetItem* item) void HighlightSettingsPage::on_localHighlightsDetails_clicked() { - // Show information specific to client/monolithic differences - if (Quassel::runMode() == Quassel::Monolithic) { - // We're running in Monolithic mode, core/client version in total sync. Discourage the use - // of local (legacy) highlights as it's identical to setting remote highlights. - QMessageBox::information(this, - tr("Legacy Highlights vs. Highlights"), - QString("

%1


%2


%3

") - .arg(tr("Legacy Highlights are replaced by Highlights"), - tr("These highlights will keep working for now, but you should move to " - "the improved highlight rules when you can."), - tr("Configure the new style of highlights in " - "%1.") - .arg(tr("Highlights")))); - } - else { - // We're running in client/split mode, allow for splitting the details. - QMessageBox::information(this, - tr("Local Highlights vs. Remote Highlights"), - QString("

%1


%2


%3

") - .arg(tr("Local Highlights apply to this device only"), - tr("Highlights configured on this page only apply to your current " - "device."), - tr("Configure highlights for all of your devices in " - "%1.") - .arg(tr("Remote Highlights").replace(" ", " ")))); - // Re-use translations of "Remote Highlights" as this is a word-for-word reference, forcing - // all spaces to be non-breaking - } + // Discourage the use of local (legacy) highlights. When not running in Monolithic mode, they + // need to be kept around for pre-0.13 cores. + QMessageBox::information(this, + tr("Legacy Highlights vs. Highlights"), + QString("

%1


%2


%3

") + .arg(tr("Legacy Highlights are replaced by Highlights"), + tr("These highlights will keep working for now, but you should move to " + "the improved highlight rules when you can."), + tr("Configure the new style of highlights in %1.") + .arg(tr("Highlights")))); } void HighlightSettingsPage::load()