Преглед изворни кода

SSL Certificate Error Dialog: show account name #3729

Change the wording of the certificate error dialog to include the
account URL and be a bit more accurate.

(Do not mention "SSL" in user facing messages)
Olivier Goffart пре 10 година
родитељ
комит
e49a8a9ffe
2 измењених фајлова са 5 додато и 16 уклоњено
  1. 3 2
      src/gui/sslerrordialog.cpp
  2. 2 14
      src/gui/sslerrordialog.ui

+ 3 - 2
src/gui/sslerrordialog.cpp

@@ -63,7 +63,7 @@ SslErrorDialog::SslErrorDialog(AccountPtr account, QWidget *parent) :
 {
     setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
     _ui->setupUi( this );
-    setWindowTitle( tr("SSL Connection") );
+    setWindowTitle( tr("Untrusted Certificate") );
     QPushButton *okButton =
             _ui->_dialogButtonBox->button( QDialogButtonBox::Ok );
     QPushButton *cancelButton =
@@ -131,8 +131,9 @@ bool SslErrorDialog::checkFailingCertsKnown( const QList<QSslError> &errors )
             msg += QL("<link rel='stylesheet' type='text/css' href='format.css'>");
             msg += QL("</head><body>");
 
+    auto host = _account->url().host();
+    msg += QL("<h3>") + tr("Cannot connect securely to <i>%1</i>:").arg(host) + QL("</h3>");
     // loop over the unknown certs and line up their errors.
-            msg += QL("<h3>") + tr("Warnings about current SSL Connection:") + QL("</h3>");
     msg += QL("<div id=\"ca_errors\">");
     foreach( const QSslCertificate& cert, _unknownCerts ) {
         msg += QL("<div id=\"ca_error\">");

+ 2 - 14
src/gui/sslerrordialog.ui

@@ -14,7 +14,7 @@
    <string>Form</string>
   </property>
   <layout class="QGridLayout" name="gridLayout">
-   <item row="2" column="0">
+   <item row="1" column="0">
     <widget class="QCheckBox" name="_cbTrustConnect">
      <property name="font">
       <font>
@@ -26,7 +26,7 @@
      </property>
     </widget>
    </item>
-   <item row="3" column="0">
+   <item row="2" column="0">
     <widget class="QDialogButtonBox" name="_dialogButtonBox">
      <property name="standardButtons">
       <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
@@ -34,18 +34,6 @@
     </widget>
    </item>
    <item row="0" column="0">
-    <widget class="QLabel" name="label">
-     <property name="font">
-      <font>
-       <pointsize>14</pointsize>
-      </font>
-     </property>
-     <property name="text">
-      <string>SSL Connection</string>
-     </property>
-    </widget>
-   </item>
-   <item row="1" column="0">
     <widget class="QTextBrowser" name="_tbErrors">
      <property name="openExternalLinks">
       <bool>true</bool>