gnome-session r4994 - in trunk: . compat
- From: fcrozat svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-session r4994 - in trunk: . compat
- Date: Tue, 26 Aug 2008 07:46:36 +0000 (UTC)
Author: fcrozat
Date: Tue Aug 26 07:46:36 2008
New Revision: 4994
URL: http://svn.gnome.org/viewvc/gnome-session?rev=4994&view=rev
Log:
2008-08-26 Frederic Crozat <fcrozat mandriva com>
* compat/at-spi-registryd-wrapper.c: always set a11y gtk modules
but unset it if at-registry could not be started. Still fixes #548982.
Modified:
trunk/ChangeLog
trunk/compat/at-spi-registryd-wrapper.c
Modified: trunk/compat/at-spi-registryd-wrapper.c
==============================================================================
--- trunk/compat/at-spi-registryd-wrapper.c (original)
+++ trunk/compat/at-spi-registryd-wrapper.c Tue Aug 26 07:46:36 2008
@@ -57,7 +57,7 @@
return FALSE;
}
-static void
+static const char *
set_gtk_modules (DBusGProxy *gsm)
{
const char *old;
@@ -114,6 +114,24 @@
}
g_free (value);
+ return old;
+}
+
+static void
+restore_gtk_modules (DBusGProxy *gsm, const char *old_gtk_modules)
+{
+
+ GError *error;
+
+ error = NULL;
+ if (!dbus_g_proxy_call (gsm, "Setenv", &error,
+ G_TYPE_STRING, "GTK_MODULES",
+ G_TYPE_STRING, old_gtk_modules,
+ G_TYPE_INVALID,
+ G_TYPE_INVALID)) {
+ g_warning ("Could not set GTK_MODULES: %s", error->message);
+ g_error_free (error);
+ }
}
int
@@ -124,6 +142,7 @@
GError *error;
DBusGConnection *connection;
DBusGProxy *gsm;
+ const char *old_gtk_modules;
gtk_init (&argc, &argv);
@@ -147,11 +166,11 @@
gdk_window_add_filter (root, registry_ior_watch, NULL);
+ old_gtk_modules = set_gtk_modules (gsm);
if (!g_spawn_command_line_async (AT_SPI_REGISTRYD_DIR "/at-spi-registryd", &error)) {
+ restore_gtk_modules (gsm, old_gtk_modules);
show_error (gsm);
/* not reached */
- } else {
- set_gtk_modules (gsm);
}
gtk_main ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]