mirror of
https://github.com/tnodir/fort
synced 2024-11-15 11:25:08 +00:00
UI: RuleEditDialog: Add placeholder text
This commit is contained in:
parent
01ef3e70d8
commit
ec41689921
@ -253,13 +253,15 @@ void ProgramEditDialog::retranslatePathPlaceholderText()
|
|||||||
const auto placeholderText = tr("# Examples:")
|
const auto placeholderText = tr("# Examples:")
|
||||||
// Prefix wildcard
|
// Prefix wildcard
|
||||||
+ '\n' + tr("# All programs in the sub-path:")
|
+ '\n' + tr("# All programs in the sub-path:")
|
||||||
+ QLatin1String("\nC:\\Git\\**")
|
+ "\nC:\\Git\\**"
|
||||||
// Name wildcard
|
// Name wildcard
|
||||||
+ '\n' + tr("# Name wildcard:")
|
+ '\n' + tr("# Name wildcard:")
|
||||||
+ QLatin1String("\nC:\\Store\\app.v*.exe")
|
+ "\nC:\\Store\\app.v*.exe"
|
||||||
|
"\nC:\\App.v*\\app.exe"
|
||||||
// Env var
|
// Env var
|
||||||
+ '\n' + tr("# Environment Variable:")
|
+ '\n' + tr("# Environment Variable:")
|
||||||
+ QLatin1String("\n%SystemRoot%\\System32\\telnet.exe");
|
+ "\n%SystemRoot%\\System32\\telnet.exe"
|
||||||
|
"\n%ProgramFiles%\\Internet Explorer\\iexplore.exe";
|
||||||
|
|
||||||
m_editWildcard->setPlaceholderText(placeholderText);
|
m_editWildcard->setPlaceholderText(placeholderText);
|
||||||
}
|
}
|
||||||
|
@ -90,6 +90,8 @@ void RuleEditDialog::retranslateUi()
|
|||||||
m_cbExclusive->setText(tr("Exclusive"));
|
m_cbExclusive->setText(tr("Exclusive"));
|
||||||
m_btZones->retranslateUi();
|
m_btZones->retranslateUi();
|
||||||
|
|
||||||
|
retranslateRulePlaceholderText();
|
||||||
|
|
||||||
m_btOk->setText(tr("OK"));
|
m_btOk->setText(tr("OK"));
|
||||||
m_btCancel->setText(tr("Cancel"));
|
m_btCancel->setText(tr("Cancel"));
|
||||||
|
|
||||||
@ -105,6 +107,17 @@ void RuleEditDialog::retranslateComboRuleType()
|
|||||||
ControlUtil::setComboBoxTexts(m_comboRuleType, list);
|
ControlUtil::setComboBoxTexts(m_comboRuleType, list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RuleEditDialog::retranslateRulePlaceholderText()
|
||||||
|
{
|
||||||
|
const auto placeholderText = tr("# Examples:")
|
||||||
|
// IP-Address:Port
|
||||||
|
+ '\n' + tr("# IP address and port:")
|
||||||
|
+ "\n1.1.1.1:udp(43)"
|
||||||
|
"\nip(1.1.1.1-8.8.8.8):port(43,80-8080)";
|
||||||
|
|
||||||
|
m_editRuleText->setPlaceholderText(placeholderText);
|
||||||
|
}
|
||||||
|
|
||||||
void RuleEditDialog::setupUi()
|
void RuleEditDialog::setupUi()
|
||||||
{
|
{
|
||||||
// Main Layout
|
// Main Layout
|
||||||
|
@ -39,6 +39,7 @@ private:
|
|||||||
|
|
||||||
void retranslateUi();
|
void retranslateUi();
|
||||||
void retranslateComboRuleType();
|
void retranslateComboRuleType();
|
||||||
|
void retranslateRulePlaceholderText();
|
||||||
|
|
||||||
void setupUi();
|
void setupUi();
|
||||||
QLayout *setupMainLayout();
|
QLayout *setupMainLayout();
|
||||||
|
Loading…
Reference in New Issue
Block a user