mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-19 16:05:03 +01:00
Show number of files to be pasted from other instance
This commit is contained in:
parent
0e90df8926
commit
29e9a86619
1 changed files with 6 additions and 1 deletions
|
|
@ -683,7 +683,12 @@ def build_item_context_menu(self, item):
|
|||
m.addSeparator()
|
||||
md = QApplication.instance().clipboard().mimeData()
|
||||
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)
|
||||
for item in sel:
|
||||
|
|
|
|||
Loading…
Reference in a new issue