diff options
author | Tomeu Vizoso <tomeu@tomeuvizoso.net> | 2007-07-29 09:03:09 (GMT) |
---|---|---|
committer | Tomeu Vizoso <tomeu@tomeuvizoso.net> | 2007-07-30 08:28:53 (GMT) |
commit | ec6fc9bfa9849492349ffc2508d7f672d50b16e3 (patch) | |
tree | 57e16baa525f342799302de04b5783aaf72f425b /shell | |
parent | 0f17ae5d04c3f3dc72f2d2c68934c93add61c7e6 (diff) |
#2570 Accept correctly image drops from Record.
Diffstat (limited to 'shell')
-rw-r--r-- | shell/view/frame/clipboardpanelwindow.py | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/shell/view/frame/clipboardpanelwindow.py b/shell/view/frame/clipboardpanelwindow.py index 3e2f626..70b87e4 100644 --- a/shell/view/frame/clipboardpanelwindow.py +++ b/shell/view/frame/clipboardpanelwindow.py @@ -86,7 +86,18 @@ class ClipboardPanelWindow(FrameWindow): logging.debug('adding type ' + selection.type + '.') cb_service = clipboardservice.get_instance() - cb_service.add_object_format(key, - selection.type, - selection.data, - on_disk = False) + if selection.type == 'text/uri-list': + uris = selection.data.split('\n') + if len(uris) > 1: + raise NotImplementedError('Multiple uris in text/uri-list still not supported.') + + cb_service.add_object_format(key, + selection.type, + uris[0], + on_disk=True) + else: + cb_service.add_object_format(key, + selection.type, + selection.data, + on_disk=False) + |