Skip to content

Commit

Permalink
Port oob to gsettings
Browse files Browse the repository at this point in the history
Create gsettings overrides files instead of using gconftool-2.

Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>
  • Loading branch information
tchx84 committed Apr 9, 2014
1 parent 1f68d99 commit fa32e29
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 15 deletions.
24 changes: 14 additions & 10 deletions modules/sugar/kspost.50.gconf.inc
@@ -1,14 +1,18 @@
# Sugar font
gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --type float --set /desktop/sugar/font/default_size 7
cat >/usr/share/glib-2.0/schemas/sugar.oob.gschema.override <<EOF
[org.sugarlabs]
show-logout=false

# disable logout button in Sugar
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /desktop/sugar/show_logout false
[org.sugarlabs.font]
default-size=7

# set sugar power management on
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /desktop/sugar/power/automatic true
[org.sugarlabs.power]
automatic=true

# set empty jabber server so that no gabble connection is attempted by default
gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --type string --set /desktop/sugar/collaboration/jabber_server ''
[org.sugarlabs.collaboration]
jabber-server=''

[org.sugarlabs.user]
default-nick='disabled'
EOF
/usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas

# Ask for the nick name when starting Sugar the first time
gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --type string --set /desktop/sugar/user/default_nick 'disabled'
13 changes: 10 additions & 3 deletions modules/sugar/kspost.60.protect.sh
Expand Up @@ -10,11 +10,18 @@ if [[ -n "$activities" ]]; then
IFS=$'\n\t, '
for activity in $activities; do
if [[ -n "$list" ]]; then
list=$list','$activity
list=$list,"'${activity}'"
else
list=$activity
list="'${activity}'"
fi
done
echo "gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --type list --list-type string --set /desktop/sugar/protected_activities [$list]"

echo "
cat >/usr/share/glib-2.0/schemas/sugar.oob.protected.gschema.override <<EOF
[org.sugarlabs]
protected-activities=[${list}]
EOF
/usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas"

IFS=$oIFS
fi
6 changes: 5 additions & 1 deletion modules/xo1/kspost.50.xo1-tweaks.inc
@@ -1,5 +1,9 @@
# do not show the Sugar default ad-hoc networks on the XO-1
gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --type bool --set /desktop/sugar/network/adhoc false
cat >/usr/share/glib-2.0/schemas/sugar.oob.xo1.gschema.override <<EOF
[org.sugarlabs.network]
adhoc=false
EOF
/usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas

# enable serial console on ttyS0
ln -sf /lib/systemd/system/serial-getty@.service \
Expand Down
6 changes: 5 additions & 1 deletion modules/xo4/kspost.50.gconf.inc
@@ -1,2 +1,6 @@
# Add the information about the model to display in the sugar ui
gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults -s /desktop/sugar/extensions/aboutcomputer/hardware_model XO-duo --type string
cat >/usr/share/glib-2.0/schemas/sugar.oob.xo4.gschema.override <<EOF
[org.sugarlabs.extensions.aboutcomputer]
hardware-model='XO-duo'
EOF
/usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas

0 comments on commit fa32e29

Please sign in to comment.