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: a1180db1eef93de8da5d6c198d0c101f7bed166f (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
46
47
48
49
50
51
52
From patchwork Wed Mar  9 16:15:10 2011
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [sugar] check for empty cursor_theme
Date: Wed, 09 Mar 2011 21:15:10 -0000
From: Martin Abente <martin.abente.lahaye@gmail.com>
X-Patchwork-Id: 714
Message-Id: <1299687310-2855-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 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