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