improve SAS dialog. Fixes #3468
This commit is contained in:
		
							parent
							
								
									48b78ee327
								
							
						
					
					
						commit
						4bd35a715b
					
				
					 1 changed files with 5 additions and 5 deletions
				
			
		| 
						 | 
					@ -3819,7 +3819,7 @@ class ESessionInfoWindow:
 | 
				
			||||||
		self.window.show_all()
 | 
							self.window.show_all()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	def update_info(self):
 | 
						def update_info(self):
 | 
				
			||||||
		labeltext = _('''Your chat session with %(jid)s is encrypted.\n\nThis session's Short Authentication String is <b>%(sas)s</b>.''') % {'jid': self.session.jid, 'sas': self.session.sas}
 | 
							labeltext = _('''Your chat session with <b>%(jid)s</b> is encrypted.\n\nThis session's Short Authentication String is <b>%(sas)s</b>.''') % {'jid': self.session.jid, 'sas': self.session.sas}
 | 
				
			||||||
		dir = os.path.join(gajim.DATA_DIR, 'pixmaps')
 | 
							dir = os.path.join(gajim.DATA_DIR, 'pixmaps')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if self.session.verified_identity:
 | 
							if self.session.verified_identity:
 | 
				
			||||||
| 
						 | 
					@ -3830,15 +3830,15 @@ class ESessionInfoWindow:
 | 
				
			||||||
					self.session.is_loggable(), True)
 | 
										self.session.is_loggable(), True)
 | 
				
			||||||
			self.window.set_title(_('''Contact's identity verified'''))
 | 
								self.window.set_title(_('''Contact's identity verified'''))
 | 
				
			||||||
			self.xml.get_widget('dialog-action_area1').set_no_show_all(True) 
 | 
								self.xml.get_widget('dialog-action_area1').set_no_show_all(True) 
 | 
				
			||||||
			self.button_label.set_text(_('Verify again'))
 | 
								self.button_label.set_text(_('Verify again...'))
 | 
				
			||||||
		else:
 | 
							else:
 | 
				
			||||||
			if self.session.control:
 | 
								if self.session.control:
 | 
				
			||||||
				self.session.control._show_lock_image(True, 'E2E', True,
 | 
									self.session.control._show_lock_image(True, 'E2E', True,
 | 
				
			||||||
					self.session.is_loggable(), False)
 | 
										self.session.is_loggable(), False)
 | 
				
			||||||
			labeltext += '\n\n' + _('''To be certain that <b>only</b> the expected person can read your messages or send you messages, you need to verify their identity by clicking the button above.''')
 | 
								labeltext += '\n\n' + _('''To be certain that <b>only</b> the expected person can read your messages or send you messages, you need to verify their identity by clicking the button below.''')
 | 
				
			||||||
			security_image = 'security-low-big.png'
 | 
								security_image = 'security-low-big.png'
 | 
				
			||||||
			self.window.set_title(_('''Contact's identity NOT verified'''))
 | 
								self.window.set_title(_('''Contact's identity NOT verified'''))
 | 
				
			||||||
			self.button_label.set_text(_('Verify'))
 | 
								self.button_label.set_text(_('Verify...'))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		path = os.path.join(dir, security_image)
 | 
							path = os.path.join(dir, security_image)
 | 
				
			||||||
		filename = os.path.abspath(path)
 | 
							filename = os.path.abspath(path)
 | 
				
			||||||
| 
						 | 
					@ -3851,7 +3851,7 @@ class ESessionInfoWindow:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	def on_verify_now_button_clicked(self, widget):
 | 
						def on_verify_now_button_clicked(self, widget):
 | 
				
			||||||
		pritext = _('''Have you verified the contact's identity?''')
 | 
							pritext = _('''Have you verified the contact's identity?''')
 | 
				
			||||||
		sectext = _('''To prevent a man-in-the-middle attack, you should speak to %(jid)s directly (in person or on the phone) and verify that they see the same Short Authentication String (SAS) as you.\n\nThis session's Short Authentication String is <b>%(sas)s</b>.''') % {'jid': self.session.jid, 'sas': self.session.sas}
 | 
							sectext = _('''To prevent talking to an unknown person, you should speak to <b>%(jid)s</b> directly (in person or on the phone) and verify that they see the same Short Authentication String (SAS) as you.\n\nThis session's Short Authentication String is <b>%(sas)s</b>.''') % {'jid': self.session.jid, 'sas': self.session.sas}
 | 
				
			||||||
		sectext += '\n\n' + _('Did you talk to the remote contact and verify the SAS?')
 | 
							sectext += '\n\n' + _('Did you talk to the remote contact and verify the SAS?')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		def on_yes(checked):
 | 
							def on_yes(checked):
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue