mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
51b3d8e31d
commit
d6a13440be
@ -450,21 +450,21 @@ class InterfaceActionWithLibraryDrop(InterfaceAction):
|
||||
'''
|
||||
|
||||
accepts_drops = True
|
||||
mime = 'application/calibre+from_library'
|
||||
mimetype_for_drop = 'application/calibre+from_library'
|
||||
|
||||
def accept_enter_event(self, event, mime_data):
|
||||
if mime_data.hasFormat(self.mime):
|
||||
if mime_data.hasFormat(self.mimetype_for_drop):
|
||||
return True
|
||||
return False
|
||||
|
||||
def accept_drag_move_event(self, event, mime_data):
|
||||
if mime_data.hasFormat(self.mime):
|
||||
if mime_data.hasFormat(self.mimetype_for_drop):
|
||||
return True
|
||||
return False
|
||||
|
||||
def drop_event(self, event, mime_data):
|
||||
if mime_data.hasFormat(self.mime):
|
||||
self.dropped_ids = tuple(map(int, mime_data.data(self.mime).data().split()))
|
||||
if mime_data.hasFormat(self.mimetype_for_drop):
|
||||
self.dropped_ids = tuple(map(int, mime_data.data(self.mimetype_for_drop).data().split()))
|
||||
QTimer.singleShot(1, self.do_drop)
|
||||
return True
|
||||
return False
|
||||
|
Loading…
x
Reference in New Issue
Block a user