From ff8bbffde19b3f91267ebfae322d3b370e80f751 Mon Sep 17 00:00:00 2001
From: un1versal
Date: Thu, 5 May 2016 09:34:03 +0100
Subject: OptionsWidget_alertsAndHighlighting: reformat + cleanup space in
string and punctuation.
---
.../OptionsWidget_alertsAndHighlighting.cpp | 41 ++++++++++++++--------
1 file changed, 26 insertions(+), 15 deletions(-)
(limited to 'src')
diff --git a/src/modules/options/OptionsWidget_alertsAndHighlighting.cpp b/src/modules/options/OptionsWidget_alertsAndHighlighting.cpp
index 67002ba08..7fc7b9dda 100644
--- a/src/modules/options/OptionsWidget_alertsAndHighlighting.cpp
+++ b/src/modules/options/OptionsWidget_alertsAndHighlighting.cpp
@@ -47,20 +47,20 @@ OptionsWidget_highlighting::OptionsWidget_highlighting(QWidget * parent)
: KviOptionsWidget(parent)
{
setObjectName("highlighting_options_widget");
-
createLayout();
KviBoolSelector * b = addBoolSelector(0, 0, 0, 0, __tr2qs_ctx("Enable word highlighting", "options"), KviOption_boolUseWordHighlighting);
- KviStringListSelector * sl = addStringListSelector(0, 1, 0, 1, __tr2qs_ctx("Words to Highlight", "options"), KviOption_stringlistHighlightWords, KVI_OPTION_BOOL(KviOption_boolUseWordHighlighting));
+ KviStringListSelector * sl = addStringListSelector(0, 1, 0, 1, __tr2qs_ctx("Words to Highlight", "options"), KviOption_stringlistHighlightWords,
+ KVI_OPTION_BOOL(KviOption_boolUseWordHighlighting));
connect(b, SIGNAL(toggled(bool)), sl, SLOT(setEnabled(bool)));
// This can be used even without Word highlighting
b = addBoolSelector(0, 2, 0, 2, __tr2qs_ctx("Highlight messages containing my nickname", "options"), KviOption_boolAlwaysHighlightNick);
- mergeTip(b, __tr2qs_ctx("If this option is enabled, KVIrc will highlight any user message containing your current nickname", "options"));
+ mergeTip(b, __tr2qs_ctx("If this option is enabled, KVIrc will highlight any user message containing your current nickname.", "options"));
- b = addBoolSelector(0, 3, 0, 3, __tr2qs_ctx("Words/Nick matching is case sensitive ", "options"), KviOption_boolCaseSensitiveHighlighting);
- mergeTip(b, __tr2qs_ctx("If this option is enabled, KVIrc will match your nick and/or the words you specified in a case sensitive manner", "options"));
+ b = addBoolSelector(0, 3, 0, 3, __tr2qs_ctx("Words/Nick matching is case sensitive", "options"), KviOption_boolCaseSensitiveHighlighting);
+ mergeTip(b, __tr2qs_ctx("If this option is enabled, KVIrc will match your nick and/or the words you specified in a case sensitive manner.", "options"));
KviTalGroupBox * gbox = addGroupBox(0, 4, 0, 4, Qt::Horizontal, __tr2qs_ctx("Highlighting Method", "options"));
@@ -72,12 +72,15 @@ OptionsWidget_highlighting::OptionsWidget_highlighting(QWidget * parent)
m_pHighlightAllOccurencesRadioButton = new QRadioButton(__tr2qs_ctx("Highlight every occurrence of a word inside text", "options"), gbox);
g->addWidget(m_pHighlightAllOccurencesRadioButton, 0, 0, 1, 2);
m_pHighlightAllOccurencesRadioButton->setChecked(KVI_OPTION_BOOL(KviOption_boolUseFullWordHighlighting));
- KviTalToolTip::add(m_pHighlightAllOccurencesRadioButton, __tr2qs_ctx("This selection will cause KVIrc to search for the highlighted words or nicknames inside the whole text. This will also highlight parts of words (e.g. if your nickname is Mark then Markus will be highlighted too).", "options"));
+ KviTalToolTip::add(m_pHighlightAllOccurencesRadioButton, __tr2qs_ctx("This selection will cause KVIrc to search for the highlighted words or "
+ "nicknames inside the whole text. This will also highlight parts of words.
"
+ "(e.g. if your nickname is Mark then Markus will be highlighted too).", "options"));
m_pHighlightWholeWordsOnlyRadioButton = new QRadioButton(__tr2qs_ctx("Highlight only whole words splitting on space and on:", "options"), gbox);
g->addWidget(m_pHighlightWholeWordsOnlyRadioButton, 1, 0, 1, 1);
m_pHighlightWholeWordsOnlyRadioButton->setChecked(!KVI_OPTION_BOOL(KviOption_boolUseFullWordHighlighting));
- KviTalToolTip::add(m_pHighlightWholeWordsOnlyRadioButton, __tr2qs_ctx("This selection will first split the string on the specified boundaries (including space) and then will compare all the parts with the highlighted words.", "options"));
+ KviTalToolTip::add(m_pHighlightWholeWordsOnlyRadioButton, __tr2qs_ctx("This selection will first split the string on the specified boundaries
"
+ "(including space) and then will compare all the parts with the highlighted words.", "options"));
m_pWordSplitterCharactersEdit = new QLineEdit(gbox);
m_pWordSplitterCharactersEdit->setText(KVI_OPTION_STRING(KviOption_stringWordSplitters));
@@ -88,10 +91,14 @@ OptionsWidget_highlighting::OptionsWidget_highlighting(QWidget * parent)
gbox = addGroupBox(0, 5, 0, 5, Qt::Horizontal, __tr2qs_ctx("Alert Options", "options"));
- b = addBoolSelector(gbox, __tr2qs_ctx("Flash the system taskbar entry on highlighted messages", "options"), KviOption_boolFlashWindowOnHighlightedMessages);
- mergeTip(b, __tr2qs_ctx("If this option is enabled, KVIrc will (attempt to) flash the system taskbar entry when a highlighted message is printed and KVIrc is not the active window", "options"));
+ b = addBoolSelector(gbox, __tr2qs_ctx("Flash the system taskbar entry on highlighted messages", "options"),
+ KviOption_boolFlashWindowOnHighlightedMessages);
+ mergeTip(b, __tr2qs_ctx("If this option is enabled, KVIrc will (attempt to) flash the system taskbar entry when "
+ "a highlighted message is printed and KVIrc is not the active window.", "options"));
+
b = addBoolSelector(gbox, __tr2qs_ctx("Popup the notifier window on highlighted messages", "options"), KviOption_boolPopupNotifierOnHighlightedMessages);
- mergeTip(b, __tr2qs_ctx("If this option is enabled, KVIrc will popup a little notifier window in the low right corner of your desktop when a highlighted message is printed and KVIrc is not the active window", "options"));
+ mergeTip(b, __tr2qs_ctx("If this option is enabled, KVIrc will popup a little notifier window in the low right corner of your desktop when a highlighted message "
+ "is printed and KVIrc is not the active window.", "options"));
addRowSpacer(0, 6, 0, 6);
}
@@ -111,17 +118,20 @@ OptionsWidget_alerts::OptionsWidget_alerts(QWidget * parent)
: KviOptionsWidget(parent)
{
setObjectName("highlighting_options_widget");
-
createLayout();
KviTalGroupBox * g = addGroupBox(0, 0, 0, 0, Qt::Horizontal, __tr2qs_ctx("Alert Restrictions", "options"));
KviBoolSelector * b3 = addBoolSelector(g, __tr2qs_ctx("Restrict alert", "options"), KviOption_boolHighlightOnlyNormalMsg);
- mergeTip(b3, __tr2qs_ctx("If this option is enabled, KVIrc will alert in the window list only if a normal message is received in a channel.
Actions like joins, parts and mode changes will be ignored.
This is useful if you are in channels with a high rate of traffic and only want to be alerted for messages that are interesting to you.", "options"));
+ mergeTip(b3, __tr2qs_ctx("If this option is enabled, KVIrc will alert in the window list only if a normal message is received in a channel. "
+ "Actions like joins, parts and mode changes will be ignored.
This is useful if you are in channels with a high rate "
+ "of traffic and only want to be alerted for messages that are interesting to you.", "options"));
- KviBoolSelector * b4 = addBoolSelector(g, __tr2qs_ctx("Alert for highlighted words", "options"), KviOption_boolHighlightOnlyNormalMsgHighlightInChanToo, KVI_OPTION_BOOL(KviOption_boolHighlightOnlyNormalMsg));
+ KviBoolSelector * b4 = addBoolSelector(g, __tr2qs_ctx("Alert for highlighted words", "options"), KviOption_boolHighlightOnlyNormalMsgHighlightInChanToo,
+ KVI_OPTION_BOOL(KviOption_boolHighlightOnlyNormalMsg));
mergeTip(b4, __tr2qs_ctx("If this option is enabled, the window list will also alert for messages which contain a word from the highlighted words list above.", "options"));
- KviBoolSelector * b5 = addBoolSelector(g, __tr2qs_ctx("Alert for query messages", "options"), KviOption_boolHighlightOnlyNormalMsgQueryToo, KVI_OPTION_BOOL(KviOption_boolHighlightOnlyNormalMsg));
+ KviBoolSelector * b5 = addBoolSelector(g, __tr2qs_ctx("Alert for query messages", "options"), KviOption_boolHighlightOnlyNormalMsgQueryToo,
+ KVI_OPTION_BOOL(KviOption_boolHighlightOnlyNormalMsg));
mergeTip(b5, __tr2qs_ctx("If this option is enabled, the window list will also alert for messages which are shown in queries.", "options"));
connect(b3, SIGNAL(toggled(bool)), b4, SLOT(setEnabled(bool)));
connect(b3, SIGNAL(toggled(bool)), b5, SLOT(setEnabled(bool)));
@@ -129,7 +139,8 @@ OptionsWidget_alerts::OptionsWidget_alerts(QWidget * parent)
KviBoolSelector * b6 = addBoolSelector(g, __tr2qs_ctx("Use custom alert level", "options"), KviOption_boolHighlightOnlyAtCostumHighlightLevel);
mergeTip(b6, __tr2qs_ctx("If this option is enabled, KVIrc will alert in the window list only if the specified alert level is reached.", "options"));
- KviUIntSelector * b7 = addUIntSelector(g, __tr2qs_ctx("Minimum alert level:", "options"), KviOption_uintMinHighlightLevel, 1, KVI_MSGTYPE_MAXLEVEL, KVI_MSGTYPE_MAXLEVEL, KVI_OPTION_BOOL(KviOption_boolHighlightOnlyAtCostumHighlightLevel));
+ KviUIntSelector * b7 = addUIntSelector(g, __tr2qs_ctx("Minimum alert level:", "options"), KviOption_uintMinHighlightLevel, 1, KVI_MSGTYPE_MAXLEVEL, KVI_MSGTYPE_MAXLEVEL,
+ KVI_OPTION_BOOL(KviOption_boolHighlightOnlyAtCostumHighlightLevel));
b7->setEnabled(KVI_OPTION_BOOL(KviOption_boolHighlightOnlyAtCostumHighlightLevel));
mergeTip(b7, __tr2qs_ctx("This option sets the minimum alert level for the window list.", "options"));
connect(b6, SIGNAL(toggled(bool)), b7, SLOT(setEnabled(bool)));
--
cgit v1.3.1-10-gc9f91