Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu@tomeuvizoso.net>2007-03-18 12:16:09 (GMT)
committer Tomeu Vizoso <tomeu@tomeuvizoso.net>2007-03-18 12:16:09 (GMT)
commit5104e24ffa76768707551f4cf2c2e0528bdee408 (patch)
tree423eb1d1c1068081c8dd2a400033c87c9045db5f /shell
parent440baae7d96503e5ddd1606f36e847b4d13b5a6f (diff)
Hack for detecting an onDisk format. Need to improve the clipboard API for the right fix.
Diffstat (limited to 'shell')
-rw-r--r--shell/view/clipboardicon.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/shell/view/clipboardicon.py b/shell/view/clipboardicon.py
index 5e941f6..0844dd2 100644
--- a/shell/view/clipboardicon.py
+++ b/shell/view/clipboardicon.py
@@ -114,7 +114,14 @@ class ClipboardIcon(CanvasIcon):
formats = obj['FORMATS']
if len(formats) > 0:
path = cb_service.get_object_data(self._object_id, formats[0])
- if os.path.exists(path):
+
+ # FIXME: would be better to check for format.onDisk
+ try:
+ path_exists = os.path.exists(path)
+ except TypeError:
+ path_exists = False
+
+ if path_exists:
activityfactory.create_with_uri(self._activity, path)
else:
logging.debug("Clipboard item file path %s didn't exist" % path)