[Sugar-devel] Copy from paint broken with Rainbow
Daniel Drake
dsd at laptop.org
Mon Feb 1 15:12:46 EST 2010
Hi,
There is a Sugar-0.82 regression in that you can't copy a selection
from paint to the clipboard (using Paint's copy button). Reproduced on
OLPC OS 8.2 with Paint-23.
Disabling Rainbow solves the issue.
At the point of failure, a broken icon is created in Sugar's clipboard
tray and this appears in shell.log
---------------------------------------------------------------------------
DBusException Traceback (most recent call last)
/usr/share/sugar/shell/view/frame/clipboardpanelwindow.py in
_owner_change_cb(self=<ClipboardPanelWindow object at 0x8748e64
(SugarFrameWindow at 0x87b8588)>, clipboard=<gtk.Clipboard object at
0x8748fcc (GtkClipboard at 0x89c1a50)>, event=<GdkEvent at 0x8a220b0>)
69 self._add_selection(key, selection)
70
---> 71 cb_service.set_object_percent(key, percent=100)
cb_service.set_object_percent = <bound method
ClipboardService.set_object_percent of <ClipboardService object at
0x874b57c (sugar+clipboard+clipboardservice+ClipboardService at
0x87d3660)>>
key = '/org/laptop/Clipboard/Objects/1'
global percent = undefined
72
73 def _add_selection(self, key, selection):
/usr/lib/python2.5/site-packages/sugar/clipboard/clipboardservice.py
in set_object_percent(self=<ClipboardService object at 0x874b57c
(sugar+cli...+clipboardservice+ClipboardService at 0x87d3660)>,
object_id='/org/laptop/Clipboard/Objects/1', percent=100)
185 """
186 self._dbus_service.set_object_percent(
--> 187 dbus.ObjectPath(object_id), percent)
global dbus.ObjectPath = <type 'dbus.ObjectPath'>
object_id = '/org/laptop/Clipboard/Objects/1'
percent = 100
188
189 def get_object(self, object_id):
/usr/lib/python2.5/site-packages/dbus/proxies.py in
__call__(self=<dbus.proxies._ProxyMethod instance at 0x90cc38c>,
*args=(dbus.ObjectPath('/org/laptop/Clipboard/Objects/1'), 100),
**keywords={})
138 introspect_sig,
139 args,
--> 140 **keywords)
keywords = {}
141
142 def call_async(self, *args, **keywords):
/usr/lib/python2.5/site-packages/dbus/connection.py in
call_blocking(self=<dbus._dbus.SessionBus (session) at 0x86f6bfc>,
bus_name='org.laptop.Clipboard', object_path='/org/laptop/Clipboard',
dbus_interface='org.laptop.Clipboard', method='set_object_percent',
signature=u'oi',
args=(dbus.ObjectPath('/org/laptop/Clipboard/Objects/1'), 100),
timeout=-1.0, utf8_strings=False, byte_arrays=False)
628 # make a blocking call
629 reply_message = self.send_message_with_reply_and_block(
--> 630 message, timeout)
message = <dbus.lowlevel.MethodCallMessage object at 0x8aa2d70>
timeout = -1.0
631 args_list = reply_message.get_args_list(**get_args_opts)
632 if len(args_list) == 0:
DBusException: org.freedesktop.DBus.Python.IOError: Traceback (most
recent call last):
File "/usr/lib/python2.5/site-packages/dbus/service.py", line 702,
in _message_cb
retval = candidate_method(self, *args, **keywords)
File "/usr/share/sugar/service/clipboardservice.py", line 123, in
set_object_percent
new_uri = self._copy_file(format.get_data())
File "/usr/share/sugar/service/clipboardservice.py", line 201, in _copy_file
shutil.copyfile(uri.path, new_file_path)
File "/usr/lib/python2.5/shutil.py", line 46, in copyfile
fsrc = open(src, 'rb')
IOError: [Errno 13] Permission denied:
'/home/olpc/isolation/1/uid_to_home_dir/10000/instance/tmpwL_h6t.png'
Could someone running a more recent Sugar with rainbow setup please
test to see if this regression still exists?
cheers
Daniel
More information about the Sugar-devel
mailing list