From: Shane Synan Date: Wed, 6 Jun 2018 19:02:40 +0000 (-0500) Subject: mono: Move Local Highlights -> Legacy Highlights X-Git-Tag: travis-deploy-test~62 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=0182f0e3977026de65be1edb6ca1e8d7ea0184fd mono: Move Local Highlights -> Legacy Highlights Rename "Local Highlights" as "Legacy Highlights", and rename "Remote Highlights" as plain "Highlights". Update the info-bar text and other references as appropriate. This reduces confusion over which highlights to configure in Monolithic mode. --- diff --git a/src/qtui/settingspages/corehighlightsettingspage.cpp b/src/qtui/settingspages/corehighlightsettingspage.cpp index 78805cf3..a413b59d 100644 --- a/src/qtui/settingspages/corehighlightsettingspage.cpp +++ b/src/qtui/settingspages/corehighlightsettingspage.cpp @@ -27,7 +27,11 @@ #include "qtui.h" CoreHighlightSettingsPage::CoreHighlightSettingsPage(QWidget *parent) - : SettingsPage(tr("Interface"), tr("Remote Highlights"), parent) + : SettingsPage(tr("Interface"), + // In Monolithic mode, local highlights are replaced by remote highlights + Quassel::runMode() == Quassel::Monolithic ? + tr("Highlights") : tr("Remote Highlights"), + parent) { ui.setupUi(this); diff --git a/src/qtui/settingspages/highlightsettingspage.cpp b/src/qtui/settingspages/highlightsettingspage.cpp index e610d852..443bde1d 100644 --- a/src/qtui/settingspages/highlightsettingspage.cpp +++ b/src/qtui/settingspages/highlightsettingspage.cpp @@ -28,7 +28,11 @@ #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(); @@ -93,9 +97,9 @@ HighlightSettingsPage::HighlightSettingsPage(QWidget *parent) // 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")); @@ -282,36 +286,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); }