#2268 Allow removing downloads from the clipboard while in progress.
This commit is contained in:
parent
c07e61509b
commit
6e6fd02322
1
NEWS
1
NEWS
@ -1,3 +1,4 @@
|
|||||||
|
* #2268 Allow removing downloads from the clipboard while in progress. (tomeu)
|
||||||
* #2240 Ensure activity uniquness in the shell. (marco)
|
* #2240 Ensure activity uniquness in the shell. (marco)
|
||||||
|
|
||||||
Snapshot f6f3f2b520
|
Snapshot f6f3f2b520
|
||||||
|
@ -134,7 +134,8 @@ class Format:
|
|||||||
def destroy(self):
|
def destroy(self):
|
||||||
if self._on_disk:
|
if self._on_disk:
|
||||||
uri = urlparse.urlparse(self._data)
|
uri = urlparse.urlparse(self._data)
|
||||||
os.remove(uri.path)
|
if os.path.isfile(uri.path):
|
||||||
|
os.remove(uri.path)
|
||||||
|
|
||||||
def get_type(self):
|
def get_type(self):
|
||||||
return self._type
|
return self._type
|
||||||
|
@ -127,9 +127,13 @@ class ClipboardService(dbus.service.Object):
|
|||||||
in_signature="o", out_signature="a{sv}")
|
in_signature="o", out_signature="a{sv}")
|
||||||
def get_object(self, object_path):
|
def get_object(self, object_path):
|
||||||
logging.debug('ClipboardService.get_object')
|
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)]
|
cb_object = self._objects[str(object_path)]
|
||||||
formats = cb_object.get_formats()
|
formats = cb_object.get_formats()
|
||||||
format_types = dbus.Array([], 's')
|
format_types = dbus.Array([], signature='s')
|
||||||
|
|
||||||
for type, format in formats.iteritems():
|
for type, format in formats.iteritems():
|
||||||
format_types.append(type)
|
format_types.append(type)
|
||||||
|
@ -94,7 +94,7 @@ class ClipboardMenu(Palette):
|
|||||||
#self._stop_item.props.sensitive = False
|
#self._stop_item.props.sensitive = False
|
||||||
self._journal_item.props.sensitive = True
|
self._journal_item.props.sensitive = True
|
||||||
else:
|
else:
|
||||||
self._remove_item.props.sensitive = False
|
self._remove_item.props.sensitive = True
|
||||||
self._open_item.props.sensitive = False
|
self._open_item.props.sensitive = False
|
||||||
# TODO: reenable the stop item when we implement stoping downloads.
|
# TODO: reenable the stop item when we implement stoping downloads.
|
||||||
#self._stop_item.props.sensitive = True
|
#self._stop_item.props.sensitive = True
|
||||||
|
Loading…
Reference in New Issue
Block a user