Commit c29017da authored by Pali Rohár's avatar Pali Rohár
Browse files

Show big fat warning that smtp password will be saved on disk in clear text

BUG: 320617
REVIEW: 110904
parent 0ba9c3ca
......@@ -506,16 +506,19 @@ OutgoingPage::OutgoingPage(QWidget *parent, QSettings &s): QScrollArea(parent),
smtpAuth->setChecked(s.value(SettingsNames::smtpAuthKey, false).toBool());
smtpUser->setText(s.value(SettingsNames::smtpUserKey).toString());
smtpPass->setText(s.value(SettingsNames::smtpPassKey).toString());
passwordWarning->setStyleSheet(SettingsDialog::warningStyleSheet);
sendmail->setText(s.value(SettingsNames::sendmailKey, SettingsNames::sendmailDefaultCmd).toString());
saveToImap->setChecked(s.value(SettingsNames::composerSaveToImapKey, true).toBool());
// Would be cool to support the special-use mailboxes
saveFolderName->setText(s.value(SettingsNames::composerImapSentKey, QLatin1String("Sent")).toString());
smtpBurl->setChecked(s.value(SettingsNames::smtpUseBurlKey, false).toBool());
connect(smtpPass, SIGNAL(textChanged(QString)), this, SLOT(maybeShowPasswordWarning()));
connect(method, SIGNAL(currentIndexChanged(int)), this, SLOT(updateWidgets()));
connect(smtpAuth, SIGNAL(toggled(bool)), this, SLOT(updateWidgets()));
connect(saveToImap, SIGNAL(toggled(bool)), this, SLOT(updateWidgets()));
updateWidgets();
maybeShowPasswordWarning();
}
void OutgoingPage::resizeEvent(QResizeEvent *event)
......@@ -636,6 +639,11 @@ void OutgoingPage::save(QSettings &s)
}
}
void OutgoingPage::maybeShowPasswordWarning()
{
passwordWarning->setVisible(!smtpPass->text().isEmpty());
}
#ifdef XTUPLE_CONNECT
XtConnectPage::XtConnectPage(QWidget *parent, QSettings &s, ImapPage *imapPage): QWidget(parent), imap(imapPage)
{
......
......@@ -106,6 +106,7 @@ private:
private slots:
void updateWidgets();
void maybeShowPasswordWarning();
private:
OutgoingPage(const OutgoingPage &); // don't implement
......
......@@ -76,7 +76,17 @@
</property>
</widget>
</item>
<item row="7" column="0">
<item row="7" column="0" colspan="2">
<widget class="QLabel" name="passwordWarning">
<property name="text">
<string>This password will be saved on disk in clear text. Note that this is the only way how to set SMTP password for now.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QLabel" name="sendmailLabel">
<property name="text">
<string>Sendmail E&amp;xecutable</string>
......@@ -109,7 +119,7 @@
</property>
</widget>
</item>
<item row="7" column="1">
<item row="8" column="1">
<widget class="LineEdit" name="sendmail"/>
</item>
<item row="3" column="0">
......@@ -129,10 +139,10 @@
</property>
</widget>
</item>
<item row="8" column="1">
<item row="9" column="1">
<widget class="QCheckBox" name="saveToImap"/>
</item>
<item row="8" column="0">
<item row="9" column="0">
<widget class="QLabel" name="saveToImapLabel">
<property name="text">
<string>Save Ou&amp;tgoing Mail</string>
......@@ -142,7 +152,7 @@
</property>
</widget>
</item>
<item row="9" column="0">
<item row="10" column="0">
<widget class="QLabel" name="saveFolderLabel">
<property name="text">
<string>Sent &amp;Folder Name</string>
......@@ -152,10 +162,10 @@
</property>
</widget>
</item>
<item row="9" column="1">
<item row="10" column="1">
<widget class="LineEdit" name="saveFolderName"/>
</item>
<item row="10" column="0">
<item row="11" column="0">
<widget class="QLabel" name="smtpBurlLabel">
<property name="toolTip">
<string>Enable forward-without-download via BURL (RFC 4468) when the IMAP and ESMTP servers support it. Extra server-side configuration is required.</string>
......@@ -168,7 +178,7 @@
</property>
</widget>
</item>
<item row="10" column="1">
<item row="11" column="1">
<widget class="QCheckBox" name="smtpBurl"/>
</item>
</layout>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment