[Dextrose] [PATCH][sugar] check for empty cursor_theme
Esteban Arias
earias at plan.ceibal.edu.uy
Wed Mar 9 12:37:40 EST 2011
To set default cursor theme and acceleration:*
accessibility_0012_add-accel-mouse-default.patch:*
diff -u -r -N sugar-0.88.1-original/src/jarabe/model/accessibility.py
sugar-0.88.1/src/jarabe/model/accessibility.py
--- sugar-0.88.1-original/src/jarabe/model/accessibility.py 2010-09-07
09:05:03.356621000 -0300
+++ sugar-0.88.1/src/jarabe/model/accessibility.py 2010-09-07
09:11:39.978625385 -0300
@@ -150,6 +150,7 @@
WHITE_CURSOR_THEME="FlatbedCursors.White.Huge"
DEFAULT_CURSOR_THEME="sugar"
+ DEFAULT_ACCEL_MOUSE=3
def get_white_mouse(self):
client = gconf.client_get_default()
@@ -192,8 +193,11 @@
def setup_accessibility(self):
client = gconf.client_get_default()
is_accessibility =
client.dir_exists("/desktop/sugar/accessibility")
+ mouse = Mouse()
if is_accessibility:
keyboard = Keyboard()
keyboard.run_config_keyboard()
- mouse = Mouse()
mouse.run_config_mouse()
+ else:
+ mouse.set_accel_mouse(mouse.DEFAULT_ACCEL_MOUSE)
+ mouse._set_accel_mouse_setting()
*accessibility_0013_add-theme-mouse-default.patch*:
diff -u -r -N sugar-0.88.1.orig/src/jarabe/model/accessibility.py
sugar-0.88.1/src/jarabe/model/accessibility.py
--- sugar-0.88.1.orig/src/jarabe/model/accessibility.py 2010-09-09
17:10:44.658376397 -0300
+++ sugar-0.88.1/src/jarabe/model/accessibility.py 2010-09-09
17:13:03.646501286 -0300
@@ -200,4 +200,5 @@
mouse.run_config_mouse()
else:
mouse.set_accel_mouse(mouse.DEFAULT_ACCEL_MOUSE)
+ mouse.set_white_mouse(False)
mouse._set_accel_mouse_setting()
2011/3/9 Martin Abente <martin.abente.lahaye at gmail.com>
> In dextrose2 caacupe tests we noticed that many laptops
> had the standard x cursor theme instead of the sugar one.
> Apparently this bug was also present on dextrose1 builds.
>
> An interesting finding while looking at this report was
> that the accesibility code for changing cursor it simply
> does not affect the cursor at all, and the real change is
> being done at bin/sugar.
>
> I have not been able to determine when or how this
> empty value is being set (yet), but this patch will
> make sure it shows the sugar cursor theme whenever
> it happens.
>
> Could this patch make sense for mainstream sugar also?
> ---
> bin/sugar.in | 8 +++++---
> 1 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/bin/sugar.in b/bin/sugar.in
> index bd6e95e..73af03c 100644
> --- a/bin/sugar.in
> +++ b/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
>
>
> --
> 1.7.1
>
> _______________________________________________
> Dextrose mailing list
> Dextrose at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/dextrose
>
--
Esteban Arias
Investigación y Desarrollo - Centro Ceibal
Avda. Italia 6201 - Edificio Los Ceibos
Montevideo - Uruguay.
Tel.: 2601.57.73 Interno 2228
E-mail : earias at plan.ceibal.edu.uy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/dextrose/attachments/20110309/e2e41a44/attachment.html>
More information about the Dextrose
mailing list