mirror of
				https://github.com/kovidgoyal/calibre.git
				synced 2025-11-03 19:17:02 -05:00 
			
		
		
		
	Show number of files to be pasted from other instance
This commit is contained in:
		
							parent
							
								
									0e90df8926
								
							
						
					
					
						commit
						29e9a86619
					
				@ -683,7 +683,12 @@ class FileList(QTreeWidget, OpenWithHandler):
 | 
				
			|||||||
            m.addSeparator()
 | 
					            m.addSeparator()
 | 
				
			||||||
        md = QApplication.instance().clipboard().mimeData()
 | 
					        md = QApplication.instance().clipboard().mimeData()
 | 
				
			||||||
        if md.hasUrls() and md.hasFormat(FILE_COPY_MIME):
 | 
					        if md.hasUrls() and md.hasFormat(FILE_COPY_MIME):
 | 
				
			||||||
            m.addAction(_('Paste files from other editor instance'), self.paste_from_other_instance)
 | 
					            import json
 | 
				
			||||||
 | 
					            name_map = json.loads(bytes(md.data(FILE_COPY_MIME)))
 | 
				
			||||||
 | 
					            m.addAction(ngettext(
 | 
				
			||||||
 | 
					                _('Paste file from other editor instance'),
 | 
				
			||||||
 | 
					                _('Paste {} files from other editor instance'),
 | 
				
			||||||
 | 
					                len(name_map)).format(len(name_map)), self.paste_from_other_instance)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        selected_map = defaultdict(list)
 | 
					        selected_map = defaultdict(list)
 | 
				
			||||||
        for item in sel:
 | 
					        for item in sel:
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user