Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/rpms/sugar/sugar-check-for-empty-cursor_theme.patch
blob: f06d0725a87709454666a41776a9687065de9a27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
From patchwork Mon Mar 14 16:20:04 2011
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [sugar] check for empty cursor_theme
Date: Mon, 14 Mar 2011 21:20:04 -0000
From: Martin Abente <martin.abente.lahaye@gmail.com>
X-Patchwork-Id: 718
Message-Id: <1300119604-10446-1-git-send-email-martin.abente.lahaye@gmail.com>
To: dextrose@lists.sugarlabs.org,
	anish@sugarlabs.org

In dextrose2 caacupe tests we noticed that many laptops
had the standard x cursor instead of the sugar one.

Accessibility options include other gconf values at
the "/desktop/sugar/peripherals/mouse" path, and 
since the sugar script did not check for full path
content or existence, this script failed to set the 
mouse cursor. under these corner cases.

Version 2: Add bernie's optimization

---
bin/sugar.in |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/bin/sugar.in b/bin/sugar.in
index bd6e95e..3615c70 100644
--- a/bin/sugar.in
+++ b/bin/sugar.in
@@ -78,11 +78,8 @@ fi
 
 
 # Set cursor theme
-gconftool-2 --dir-exists=/desktop/sugar/peripherals/mouse
-EXIST_SUGAR_CURSOR_THEME=$(echo $?)
-if [[ $EXIST_SUGAR_CURSOR_THEME == 0 ]]; then
-    CURSOR_THEME=$(gconftool-2 --get /desktop/sugar/peripherals/mouse/cursor_theme);
-else
+CURSOR_THEME=$(gconftool-2 --get /desktop/sugar/peripherals/mouse/cursor_theme)
+if test -z "$CURSOR_THEME"; then
     CURSOR_THEME="sugar"
 fi