diff options
author | Marco Pesenti Gritti <mpg@redhat.com> | 2007-09-26 08:09:26 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <mpg@redhat.com> | 2007-09-26 08:09:26 (GMT) |
commit | 55baffea32b3754ca120a75ce1b1ebd76ba613f8 (patch) | |
tree | c5443d54bcd959af0b29f396e87ec5df7a917351 /services/shell/clipboardservice.py | |
parent | a449430500b28c67a9d528f8f595d592d7250e35 (diff) |
Make DirectSave just a special text/uri-list which owns
the disk data.
Diffstat (limited to 'services/shell/clipboardservice.py')
-rw-r--r-- | services/shell/clipboardservice.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/services/shell/clipboardservice.py b/services/shell/clipboardservice.py index f0b2baa..c8973ed 100644 --- a/services/shell/clipboardservice.py +++ b/services/shell/clipboardservice.py @@ -76,7 +76,9 @@ class ClipboardService(dbus.service.Object): cb_object = self._objects[str(object_path)] if format_type == 'XdndDirectSave0': - cb_object.add_format(Format(format_type, data, on_disk)) + format = Format('text/uri-list', data, on_disk) + format.owns_disk_data = True + cb_object.add_format(format) elif on_disk and cb_object.get_percent() == 100: new_uri = self._copy_file(data) cb_object.add_format(Format(format_type, new_uri, on_disk)) @@ -116,7 +118,7 @@ class ClipboardService(dbus.service.Object): if percent == 100: formats = cb_object.get_formats() for format_name, format in formats.iteritems(): - if format.is_on_disk() and format_name != 'XdndDirectSave0': + if format.is_on_disk() and not format.owns_disk_data: new_uri = self._copy_file(format.get_data()) format.set_data(new_uri) |