we don't need escape for strings, that are
displayed as text
This commit is contained in:
		
							parent
							
								
									7719f41ecc
								
							
						
					
					
						commit
						0cb3d7cbd7
					
				
					 1 changed files with 8 additions and 13 deletions
				
			
		| 
						 | 
					@ -173,15 +173,14 @@ class FileTransfersWindow:
 | 
				
			||||||
			(file_path, file_name) = os.path.split(file_props['file-name'])
 | 
								(file_path, file_name) = os.path.split(file_props['file-name'])
 | 
				
			||||||
		else:
 | 
							else:
 | 
				
			||||||
			file_name = file_props['name']
 | 
								file_name = file_props['name']
 | 
				
			||||||
		sectext = '\t' + _('Filename: %s') % \
 | 
							sectext = '\t' + _('Filename: %s') % file_name
 | 
				
			||||||
			gtkgui_helpers.escape_for_pango_markup(file_name)
 | 
					 | 
				
			||||||
		sectext += '\n\t' + _('Size: %s') % \
 | 
							sectext += '\n\t' + _('Size: %s') % \
 | 
				
			||||||
		helpers.convert_bytes(file_props['size'])
 | 
							helpers.convert_bytes(file_props['size'])
 | 
				
			||||||
		if file_props['type'] == 'r':
 | 
							if file_props['type'] == 'r':
 | 
				
			||||||
			jid = unicode(file_props['sender']).split('/')[0]
 | 
								jid = unicode(file_props['sender']).split('/')[0]
 | 
				
			||||||
			sender_name = gajim.contacts.get_first_contact_from_jid( 
 | 
								sender_name = gajim.contacts.get_first_contact_from_jid( 
 | 
				
			||||||
				file_props['tt_account'], jid).get_shown_name()
 | 
									file_props['tt_account'], jid).get_shown_name()
 | 
				
			||||||
			sender = gtkgui_helpers.escape_for_pango_markup(sender_name)
 | 
								sender = sender_name
 | 
				
			||||||
		else:
 | 
							else:
 | 
				
			||||||
			#You is a reply of who sent a file
 | 
								#You is a reply of who sent a file
 | 
				
			||||||
			sender = _('You')
 | 
								sender = _('You')
 | 
				
			||||||
| 
						 | 
					@ -191,14 +190,13 @@ class FileTransfersWindow:
 | 
				
			||||||
			jid = unicode(file_props['receiver']).split('/')[0]
 | 
								jid = unicode(file_props['receiver']).split('/')[0]
 | 
				
			||||||
			receiver_name = gajim.contacts.get_first_contact_from_jid( 
 | 
								receiver_name = gajim.contacts.get_first_contact_from_jid( 
 | 
				
			||||||
				file_props['tt_account'], jid).get_shown_name()
 | 
									file_props['tt_account'], jid).get_shown_name()
 | 
				
			||||||
			recipient = gtkgui_helpers.escape_for_pango_markup(receiver_name)
 | 
								recipient = receiver_name
 | 
				
			||||||
		else:
 | 
							else:
 | 
				
			||||||
			#You is a reply of who received a file
 | 
								#You is a reply of who received a file
 | 
				
			||||||
			recipient = _('You')
 | 
								recipient = _('You')
 | 
				
			||||||
		sectext += recipient
 | 
							sectext += recipient
 | 
				
			||||||
		if file_props['type'] == 'r':
 | 
							if file_props['type'] == 'r':
 | 
				
			||||||
			sectext += '\n\t' +_('Saved in: %s') % \
 | 
								sectext += '\n\t' +_('Saved in: %s') % file_path
 | 
				
			||||||
				gtkgui_helpers.escape_for_pango_markup(file_path)
 | 
					 | 
				
			||||||
		self.dialog = dialogs.HigDialog(None, gtk.MESSAGE_INFO, gtk.BUTTONS_NONE, 
 | 
							self.dialog = dialogs.HigDialog(None, gtk.MESSAGE_INFO, gtk.BUTTONS_NONE, 
 | 
				
			||||||
				_('File transfer completed'), sectext)
 | 
									_('File transfer completed'), sectext)
 | 
				
			||||||
		if file_props['type'] == 'r':
 | 
							if file_props['type'] == 'r':
 | 
				
			||||||
| 
						 | 
					@ -235,10 +233,8 @@ _('Connection with peer cannot be established.'))
 | 
				
			||||||
			file_name = os.path.basename(file_props['file-name'])
 | 
								file_name = os.path.basename(file_props['file-name'])
 | 
				
			||||||
		else:
 | 
							else:
 | 
				
			||||||
			file_name = file_props['name']
 | 
								file_name = file_props['name']
 | 
				
			||||||
		sectext = '\t' + _('Filename: %s') % \
 | 
							sectext = '\t' + _('Filename: %s') % file_name
 | 
				
			||||||
			gtkgui_helpers.escape_for_pango_markup(file_name)
 | 
							sectext += '\n\t' + _('Sender: %s') % jid
 | 
				
			||||||
		sectext += '\n\t' + _('Sender: %s') % \
 | 
					 | 
				
			||||||
			gtkgui_helpers.escape_for_pango_markup(jid)
 | 
					 | 
				
			||||||
		dialogs.ErrorDialog(_('File transfer stopped by the contact of the other side'), \
 | 
							dialogs.ErrorDialog(_('File transfer stopped by the contact of the other side'), \
 | 
				
			||||||
			sectext)
 | 
								sectext)
 | 
				
			||||||
		self.tree.get_selection().unselect_all()
 | 
							self.tree.get_selection().unselect_all()
 | 
				
			||||||
| 
						 | 
					@ -563,9 +559,8 @@ _('Connection with peer cannot be established.'))
 | 
				
			||||||
			(file_path, file_name) = os.path.split(file_props['file-name'])
 | 
								(file_path, file_name) = os.path.split(file_props['file-name'])
 | 
				
			||||||
		else:
 | 
							else:
 | 
				
			||||||
			file_name = file_props['name']
 | 
								file_name = file_props['name']
 | 
				
			||||||
		text_props = gtkgui_helpers.escape_for_pango_markup(file_name) + '\n'
 | 
							text_props = file_name + '\n'
 | 
				
			||||||
		text_props += gtkgui_helpers.escape_for_pango_markup(
 | 
							text_props += contact.get_shown_name()
 | 
				
			||||||
			contact.get_shown_name())
 | 
					 | 
				
			||||||
		self.model.set(iter, 1, text_labels, 2, text_props, C_SID,
 | 
							self.model.set(iter, 1, text_labels, 2, text_props, C_SID,
 | 
				
			||||||
			file_props['type'] + file_props['sid'])
 | 
								file_props['type'] + file_props['sid'])
 | 
				
			||||||
		self.set_progress(file_props['type'], file_props['sid'], 0, iter)
 | 
							self.set_progress(file_props['type'], file_props['sid'], 0, iter)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue