X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fsettingspages%2Fhighlightsettingspage.cpp;h=db5982e9eb76906f389837d158e0184c15f0da2e;hb=54ebc1bf00f4f9a8376629925329f0e72be04662;hp=e610d852a6c9e8f4c210a47dc92406877b26e1e0;hpb=d261638f2e30aa47a08f1c3f43372da0c0e8d13f;p=quassel.git diff --git a/src/qtui/settingspages/highlightsettingspage.cpp b/src/qtui/settingspages/highlightsettingspage.cpp index e610d852..db5982e9 100644 --- a/src/qtui/settingspages/highlightsettingspage.cpp +++ b/src/qtui/settingspages/highlightsettingspage.cpp @@ -20,15 +20,21 @@ #include "highlightsettingspage.h" +#include +#include + #include "client.h" +#include "icon.h" #include "qtui.h" #include "uisettings.h" -#include -#include HighlightSettingsPage::HighlightSettingsPage(QWidget *parent) - : SettingsPage(tr("Interface"), tr("Local Highlights"), parent) + : SettingsPage(tr("Interface"), + // In Monolithic mode, local highlights are replaced by remote highlights + Quassel::runMode() == Quassel::Monolithic ? + tr("Legacy Highlights") : tr("Local Highlights"), + parent) { ui.setupUi(this); ui.highlightTable->verticalHeader()->hide(); @@ -58,8 +64,8 @@ HighlightSettingsPage::HighlightSettingsPage(QWidget *parent) ui.highlightTable->horizontalHeaderItem(HighlightSettingsPage::CsColumn)->toolTip()); ui.highlightTable->horizontalHeaderItem(HighlightSettingsPage::ChanColumn)->setToolTip( - tr("

Channel: Semicolon separated list of channel names, leave blank to " - "match any name.

" + tr("

Channel: Semicolon separated list of channel/query names, leave " + "blank to match any name.

" "

Example:
" "#quassel*; #foobar; !#quasseldroid
" "would match on #foobar and any channel starting with #quassel " @@ -88,14 +94,14 @@ HighlightSettingsPage::HighlightSettingsPage(QWidget *parent) #endif // Information icon - ui.localHighlightsIcon->setPixmap(QIcon::fromTheme("dialog-information").pixmap(16)); + 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 highlights as it's identical to setting remote highlights. + // of local (legacy) highlights as it's identical to setting remote highlights. ui.localHighlightsLabel->setText( - tr("Local Highlights are replaced by Remote Highlights")); + 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")); @@ -124,7 +130,7 @@ bool HighlightSettingsPage::hasDefaults() const void HighlightSettingsPage::defaults() { - ui.highlightNoNick->setChecked(true); + ui.highlightCurrentNick->setChecked(true); ui.nicksCaseSensitive->setChecked(false); emptyTable(); @@ -170,8 +176,8 @@ void HighlightSettingsPage::addNewRow(QString name, bool regex, bool cs, bool en tr("CS: This option determines if the highlight rule and Channel " "should be interpreted case sensitive.")); chanNameItem->setToolTip( - tr("

Channel: Semicolon separated list of channel names, leave blank to " - "match any name.

" + tr("

Channel: Semicolon separated list of channel/query names, leave " + "blank to match any name.

" "

Example:
" "#quassel*; #foobar; !#quasseldroid
" "would match on #foobar and any channel starting with #quassel " @@ -282,36 +288,33 @@ void HighlightSettingsPage::tableChanged(QTableWidgetItem *item) void HighlightSettingsPage::on_localHighlightsDetails_clicked() { - // Re-use translations of "Remote Highlights" as this is a word-for-word reference, forcing all - // spaces to non-breaking - const QString remoteHighlightsName = tr("Remote Highlights").replace(" ", " "); - QString localHighlightsMsgText; - - // Set up client/monolithic local highlights information + // 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 highlights as it's identical to setting remote highlights. - localHighlightsMsgText = - QString("

%1


%2


%3

" - ).arg(tr("Local Highlights are replaced by Remote 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(remoteHighlightsName)); + // 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. - localHighlightsMsgText = - 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(remoteHighlightsName)); + 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 } - - QMessageBox::information(this, - tr("Local Highlights vs. Remote Highlights"), - localHighlightsMsgText); }