#2268 Allow removing downloads from the clipboard while in progress.

master
Tomeu Vizoso 17 years ago
parent c07e61509b
commit 6e6fd02322

@ -1,3 +1,4 @@
* #2268 Allow removing downloads from the clipboard while in progress. (tomeu)
* #2240 Ensure activity uniquness in the shell. (marco)
Snapshot f6f3f2b520

@ -134,7 +134,8 @@ class Format:
def destroy(self):
if self._on_disk:
uri = urlparse.urlparse(self._data)
os.remove(uri.path)
if os.path.isfile(uri.path):
os.remove(uri.path)
def get_type(self):
return self._type

@ -127,9 +127,13 @@ class ClipboardService(dbus.service.Object):
in_signature="o", out_signature="a{sv}")
def get_object(self, object_path):
logging.debug('ClipboardService.get_object')
if not self._objects.has_key(str(object_path)):
return dbus.Dictionary({}, signature='sv')
cb_object = self._objects[str(object_path)]
formats = cb_object.get_formats()
format_types = dbus.Array([], 's')
format_types = dbus.Array([], signature='s')
for type, format in formats.iteritems():
format_types.append(type)

@ -94,7 +94,7 @@ class ClipboardMenu(Palette):
#self._stop_item.props.sensitive = False
self._journal_item.props.sensitive = True
else:
self._remove_item.props.sensitive = False
self._remove_item.props.sensitive = True
self._open_item.props.sensitive = False
# TODO: reenable the stop item when we implement stoping downloads.
#self._stop_item.props.sensitive = True

Loading…
Cancel
Save