92 if cursor is not None: |
92 if cursor is not None: |
93 QApplication.restoreOverrideCursor() |
93 QApplication.restoreOverrideCursor() |
94 parent = isinstance(self, QWidget) and self or None |
94 parent = isinstance(self, QWidget) and self or None |
95 msgBox = E5MessageBox.E5MessageBox( |
95 msgBox = E5MessageBox.E5MessageBox( |
96 E5MessageBox.Question, |
96 E5MessageBox.Question, |
97 self.trUtf8("Subversion SSL Server Certificate"), |
97 self.tr("Subversion SSL Server Certificate"), |
98 self.trUtf8("""<p>Accept the following SSL certificate?</p>""" |
98 self.tr("""<p>Accept the following SSL certificate?</p>""" |
99 """<table>""" |
99 """<table>""" |
100 """<tr><td>Realm:</td><td>{0}</td></tr>""" |
100 """<tr><td>Realm:</td><td>{0}</td></tr>""" |
101 """<tr><td>Hostname:</td><td>{1}</td></tr>""" |
101 """<tr><td>Hostname:</td><td>{1}</td></tr>""" |
102 """<tr><td>Fingerprint:</td><td>{2}</td></tr>""" |
102 """<tr><td>Fingerprint:</td><td>{2}</td></tr>""" |
103 """<tr><td>Valid from:</td><td>{3}</td></tr>""" |
103 """<tr><td>Valid from:</td><td>{3}</td></tr>""" |
104 """<tr><td>Valid until:</td><td>{4}</td></tr>""" |
104 """<tr><td>Valid until:</td><td>{4}</td></tr>""" |
105 """<tr><td>Issuer name:</td><td>{5}</td></tr>""" |
105 """<tr><td>Issuer name:</td><td>{5}</td></tr>""" |
106 """</table>""") |
106 """</table>""") |
107 .format(trust_dict["realm"], |
107 .format(trust_dict["realm"], |
108 trust_dict["hostname"], |
108 trust_dict["hostname"], |
109 trust_dict["finger_print"], |
109 trust_dict["finger_print"], |
110 trust_dict["valid_from"], |
110 trust_dict["valid_from"], |
111 trust_dict["valid_until"], |
111 trust_dict["valid_until"], |
112 trust_dict["issuer_dname"]), |
112 trust_dict["issuer_dname"]), |
113 modal=True, parent=parent) |
113 modal=True, parent=parent) |
114 permButton = msgBox.addButton(self.trUtf8("&Permanent accept"), |
114 permButton = msgBox.addButton(self.tr("&Permanent accept"), |
115 E5MessageBox.AcceptRole) |
115 E5MessageBox.AcceptRole) |
116 tempButton = msgBox.addButton(self.trUtf8("&Temporary accept"), |
116 tempButton = msgBox.addButton(self.tr("&Temporary accept"), |
117 E5MessageBox.AcceptRole) |
117 E5MessageBox.AcceptRole) |
118 msgBox.addButton(self.trUtf8("&Reject"), E5MessageBox.RejectRole) |
118 msgBox.addButton(self.tr("&Reject"), E5MessageBox.RejectRole) |
119 msgBox.exec_() |
119 msgBox.exec_() |
120 if cursor is not None: |
120 if cursor is not None: |
121 QApplication.setOverrideCursor(cursor) |
121 QApplication.setOverrideCursor(cursor) |
122 if msgBox.clickedButton() == permButton: |
122 if msgBox.clickedButton() == permButton: |
123 return (True, trust_dict["failures"], True) |
123 return (True, trust_dict["failures"], True) |