[Dextrose] [PATCH][sugar] check for empty cursor_theme

Sascha Silbe sascha-ml-reply-to-2011-2 at silbe.org
Thu Mar 10 05:14:44 EST 2011


Excerpts from Martin Abente's message of Wed Mar 09 17:15:10 +0100 2011:

[bin/sugar.in]
> @@ -80,10 +80,12 @@ fi
>  # Set cursor theme
>  gconftool-2 --dir-exists=/desktop/sugar/peripherals/mouse
>  EXIST_SUGAR_CURSOR_THEME=$(echo $?)
> +CURSOR_THEME="sugar"
>  if [[ $EXIST_SUGAR_CURSOR_THEME == 0 ]]; then
> -    CURSOR_THEME=$(gconftool-2 --get /desktop/sugar/peripherals/mouse/cursor_theme);
> -else
> -    CURSOR_THEME="sugar"
> +    STORED_CURSOR_THEME=$(gconftool-2 --get /desktop/sugar/peripherals/mouse/cursor_theme);
> +    if [[ $STORED_CURSOR_THEME != "" ]]; then
> +        CURSOR_THEME=$STORED_CURSOR_THEME
> +    fi
>  fi

FWIW, this is what it looks like in DX-3 [1]:

diff --git a/bin/sugar.in b/bin/sugar.in
index ed24561..90fbf8f 100644
--- a/bin/sugar.in
+++ b/bin/sugar.in
@@ -87,7 +87,15 @@ if [ -f ~/.sugar/debug ]; then
         . ~/.sugar/debug
 fi
 
-echo Xcursor.theme: sugar | xrdb -merge
+
+if gconftool-2 --dir-exists=/desktop/sugar/peripherals/mouse ; then
+    CURSOR_THEME="$(gconftool-2 --get /desktop/sugar/peripherals/mouse/cursor_theme)"
+else
+    CURSOR_THEME="sugar"
+fi
+
+
+echo Xcursor.theme: $CURSOR_THEME | xrdb -merge
 metacity --no-force-fullscreen -d $DISPLAY &
 
 exec sugar-session


Sascha

[1] https://people.sugarlabs.org/~silbe/dextrose/patchsets/sugar-dx3-20110224.tar.gz
-- 
http://sascha.silbe.org/
http://www.infra-silbe.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 494 bytes
Desc: not available
URL: <http://lists.sugarlabs.org/archive/dextrose/attachments/20110310/fc0dc81d/attachment.pgp>


More information about the Dextrose mailing list