Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Schampijer <simon@schampijer.de>2011-06-03 10:35:52 (GMT)
committer Simon Schampijer <simon@schampijer.de>2011-06-24 12:44:39 (GMT)
commit60d7e18c2f5a4c6d2522c51c3758cb13e671375c (patch)
treef77dff70a1de20b9de4e7b0942492421aa141733
parent47f2f464f47728afa6b2e792e4d7d4478f36d96e (diff)
Make sure the entry has the right color when copying from external device to Journal SL #2690
The patch 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 where when you copy a Journal entry from another user on an external device and then into your Journal cleanly. The color stays the same. Signed-off-by: Simon Schampijer <simon@laptop.org> Acked-By: Sascha Silbe <silbe@activitycentral.com>
-rw-r--r--src/jarabe/journal/model.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/jarabe/journal/model.py b/src/jarabe/journal/model.py
index 2be2bde..4ea6b7e 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