--- activity.old 2010-04-14 10:07:23.000000000 +1000 +++ activity 2011-01-23 11:12:23.000000000 +1000 @@ -241,8 +241,122 @@ echo -n "." gconftool-2 --load $SRCDIR/views.dump + + echo -n "." + # hack test for modified desktop + rm -f /home/user/.backgrounds/* + cp /home/user/multi_backgrounds/$1/*.png /home/user/.backgrounds/ + cp /home/user/multi_backgrounds/$1/cache.info /home/user/.backgrounds/ + gconftool -s /apps/osso/hildon-desktop/views/active -t list --list-type int [1,2,3,4,5,6,7,8,9] + for i in 1 2 3 4 5 6 7 8 9 + # do gconftool -s /apps/osso/hildon-desktop/views/$i/bg-image -t string /home/user/multi_backgrounds/$1/background-$i.png + do gconftool -s /apps/osso/hildon-desktop/views/$1/bg-image -t string /home/user/.backgrounds/background-$i.png + gconftool -s /apps/osso/hildon-desktop/views/active -t list --list-type int [1,2,3,4,5,6,7,8,9] + done + set_current $1 + + echo +} + +qload() +{ + + if [ -z "$1" ] ; then + cat << _KOKO +Pass the new activity as the first argument. +_KOKO + exit 1 + fi + + if [ "x$1" = "x-f" ] ; then + ACT="$2" + else + ACT="$1" + fi + + echo "Switching to activity: $ACT" + + restore2 "$ACT" + + empty + + restart_hildonhome + + SRCDIR="$DSTDIR0/$1" + + if is_empty "$1" ; then + echo "Empty desktop" + set_current $1 + return + fi + + echo -n "Restoring " + + # First load the views - this will be repeated at the end + + gconftool-2 --load $SRCDIR/views.dump echo -n "." + + T="$SRCDIR/home-thumbnails.tar.gz" + if [ -e $T ] ; then + [ -d "$THUMBNAILS" ] || mkdir "$THUMBNAILS" + + tar -zxf $SRCDIR/home-thumbnails.tar.gz -C $THUMBNAILS + fi + + echo -n "." + + gconftool-2 --load $SRCDIR/bookmarks.dump + + echo -n "." + + gconftool-2 --load $SRCDIR/applets.dump + + sleep 3 + echo -n "." + + #cp $SRCDIR/home.plugins "$HOME/.config/hildon-desktop/home.plugins" + if [ -e "$SRCDIR/home.plugins" ] ; then + cp $SRCDIR/home.plugins "$HOMEPLUGINS" + else + rm -f $SRCDIR/home.plugins + fi + + sleep 2 + + echo -n "." + + gconftool-2 -s --type list --list-type string \ + "$HHBASE/bookmark-shortcuts" \ + "$(cat $SRCDIR/bookmark-shortcuts)" + + echo -n "." + gconftool-2 -s --type list --list-type string \ + "$HHBASE/task-shortcuts" \ + "$(cat $SRCDIR/task-shortcuts)" + echo -n "." + gconftool-2 -s --type list --list-type string \ + "$CONTACTS" \ + "$(cat $SRCDIR/contacts)" + sleep 1 + + echo -n "." + + gconftool-2 --load $SRCDIR/applets.dump + + echo -n "." + + gconftool-2 --load $SRCDIR/views.dump + + echo -n "." + # hack test for modified desktop + rm -f /home/user/.backgrounds/* + gconftool -s /apps/osso/hildon-desktop/views/active -t list --list-type int [1,2,3,4,5,6,7,8,9] + for i in 1 2 3 4 5 6 7 8 9 + do gconftool -s /apps/osso/hildon-desktop/views/$i/bg-image -t string /home/user/multi_backgrounds/$1/background-$i.png + gconftool -s /apps/osso/hildon-desktop/views/active -t list --list-type int [1,2,3,4,5,6,7,8,9] + done set_current $1 echo @@ -500,9 +614,13 @@ # Just load do_load "$2" "$3" ;; + qload) + # Just load + qload "$2" "$3" + ;; change) - # Save the current and load the next - do_change "$2" + # Save the current and load the next + do_change "$2" ;; list) do_list