Bug#287965: gconf way to disable the warning

Gerfried Fuchs Gerfried Fuchs <alfie@ist.org>, 287965@bugs.debian.org
Tue, 11 Jan 2005 10:43:01 +0100


--tThc/1wpZn/ma/RB
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

* Margarita Manterola <debian@marga.com.ar> [2005-01-04 15:01]:
> While looking for a way to actually fix this bug, I found this piece
> of code in the file gnome-settings-keyboard-xkb.c:
>=20
> static const char DISABLE_XMM_WARNING_KEY[] =3D
>     "/desktop/gnome/peripherals/keyboard/disable_xmm_and_xkb_warning";
>=20
> This looks to me like doing:
>     gconftool-2 --type bool --set \
>     /desktop/gnome/peripherals/keyboard/disable_xmm_and_xkb_warning true

 Didn't work, unfortunately....

 But thanks for the pointer, am now fetching the source and grepping for
where DISABLE_XMM_WARNING_KEY is used...  Found it.  Nice, but it seems
that the used function for that isn't wrapped with it. Function
gnome_settings_keyboard_xkb_load calls apply_settings which calls
activation_error directly.

 Maybe the call to activation_error in here should be wrapped in an if
statement?  I *think* the following patch might solve it, using this
key:

#v+
--- gnome-settings-keyboard-xkb.c.orig	2004-10-09 03:52:01.000000000 +0200
+++ gnome-settings-keyboard-xkb.c	2005-01-11 10:37:37.000000000 +0100
@@ -113,6 +113,8 @@
 				(*paCallback) (paCallbackUserData);
 			}
 		} else {
+			if (gconf_client_get_bool (gcc, DISABLE_XMM_WARNING_KEY, NULL))
+				return;
 			g_warning
 				("Could not activate the XKB configuration");
 			activation_error ();
#v-

 I'm not sure if this is clean enough and not an abuse of that very key
in the gconf database. Though it would at least partly making me happy
when it's applied.  :)

 So long,
Alfie
--=20
I don't know, chmod g+a something  and the world goes crazy :)
                                  -- Craig Small, d-n-a@l.d.o

--tThc/1wpZn/ma/RB
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFB45+kMU96lewVKUIRAp4CAKCnIFFR80gdcNhqeaSBnMvgN5CdPQCgiABT
gVv1R67jeV8XKaOxre9zoZY=
=W4DQ
-----END PGP SIGNATURE-----

--tThc/1wpZn/ma/RB--