[PATCH olpc-os-builder 05/14] module sugar: Add support for setting the list of protected activities

Sascha Silbe silbe at activitycentral.com
Thu Mar 17 11:21:19 EDT 2011

Signed-off-by: Sascha Silbe <silbe at activitycentral.com>
 modules/sugar/README                 |   11 +++++++----
 modules/sugar/kspost.51.protected.sh |    7 +++++++
 2 files changed, 14 insertions(+), 4 deletions(-)
 create mode 100644 modules/sugar/kspost.51.protected.sh

diff --git a/modules/sugar/README b/modules/sugar/README
index 2a35559..9b0db6e 100644
--- a/modules/sugar/README
+++ b/modules/sugar/README
@@ -1,8 +1,9 @@
 This module adds the Sugar learning environment to the build.
-It has 2 optional configuration options which let you add or remove activities
-from the default favorites view. Both accept comma-separated lists of activity
+Two optional configuration options let you add or remove activities from the
+default favorites view. Both accept comma-separated lists of activity IDs.
+You can also mark activities as "protected" to prevent these activities from
+being removed using the Sugar UI.
@@ -15,4 +16,6 @@ favorites_view_add=
+	org.laptop.Terminal,
+	org.olenepal.DataManager
diff --git a/modules/sugar/kspost.51.protected.sh b/modules/sugar/kspost.51.protected.sh
new file mode 100644
index 0000000..d295e0b
--- /dev/null
+++ b/modules/sugar/kspost.51.protected.sh
@@ -0,0 +1,7 @@
+# Licensed under the terms of the GNU GPL v2 or later; see COPYING for details.
+. $OOB__shlib
+protected_activities="$(read_config sugar protected_activities |tr -d '[:space:]')"
+gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --type list --list-type string --set /desktop/sugar/protected_activities '['"${protected_activities}"']'

More information about the Devel mailing list