#10840 HIGH 11.2.0-: Entry not colored when started from external device (or first copied from device)
Zarro Boogs per Child
bugtracker at laptop.org
Fri Jun 3 06:35:20 EDT 2011
#10840: Entry not colored when started from external device (or first copied from
device)
------------------------------+---------------------------------------------
Reporter: erikos | Owner: erikos
Type: defect | Status: new
Priority: high | Milestone: 11.2.0-M4
Component: sugar | Version: Development build as of this date
Resolution: | Keywords:
Next_action: review | Verified: 0
Deployment_affected: | Blockedby:
Blocking: |
------------------------------+---------------------------------------------
Changes (by erikos):
* next_action: code => review
Comment:
{{{
diff --git a/src/jarabe/journal/model.py b/src/jarabe/journal/model.py
index fd25681..b246abb 100644
--- a/src/jarabe/journal/model.py
+++ b/src/jarabe/journal/model.py
@@ -30,10 +30,12 @@ from gettext import gettext as _
import gobject
import dbus
import gio
+import gconf
from sugar import dispatch
from sugar import mime
from sugar import util
+from sugar.graphics.xocolor import XoColor
DS_DBUS_SERVICE = 'org.laptop.sugar.DataStore'
@@ -615,6 +617,9 @@ def copy(metadata, mount_point):
"""Copies an object to another mount point
"""
metadata = get(metadata['uid'])
+ if mount_point == '/' and metadata['icon-color'] ==
'#000000,#ffffff':
+ client = gconf.client_get_default()
+ metadata['icon-color'] =
client.get_string('/desktop/sugar/user/color')
file_path = get_file(metadata['uid'])
metadata['mountpoint'] = mount_point
}}}
The patch above does make sure that the color of the entry has the owner's
color when you copy it from an external device to the Journal. It handles
the case when you copy a Journal entry from another user on an external
device and then into your Journal cleanly. The color stays the same.
--
Ticket URL: <http://dev.laptop.org/ticket/10840#comment:1>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system
More information about the Bugs
mailing list