Author: vuntz
Date: Mon Feb 2 13:52:44 2009
New Revision: 55183
URL: http://svn.opensuse.org/viewcvs/yast?rev=55183&view=rev
Log:
2009-01-31 Vincent Untz
* src/control-center.c: (main): force not using the default handler for
gconf errors. libgnomeui sets one, and when a program is run under "su"
(not "su -"), we get gconf errors. And this program is often run under
"su", it seems :-)
Modified:
trunk/control-center-gnome/ChangeLog
trunk/control-center-gnome/src/control-center.c
Modified: trunk/control-center-gnome/ChangeLog
URL: http://svn.opensuse.org/viewcvs/yast/trunk/control-center-gnome/ChangeLog?rev=55183&r1=55182&r2=55183&view=diff
==============================================================================
--- trunk/control-center-gnome/ChangeLog (original)
+++ trunk/control-center-gnome/ChangeLog Mon Feb 2 13:52:44 2009
@@ -1,3 +1,10 @@
+2009-01-31 Vincent Untz
+
+ * src/control-center.c: (main): force not using the default handler for
+ gconf errors. libgnomeui sets one, and when a program is run under "su"
+ (not "su -"), we get gconf errors. And this program is often run under
+ "su", it seems :-)
+
2008-05-12 Michael Meeks
* Version 2.13.3
Modified: trunk/control-center-gnome/src/control-center.c
URL: http://svn.opensuse.org/viewcvs/yast/trunk/control-center-gnome/src/control-center.c?rev=55183&r1=55182&r2=55183&view=diff
==============================================================================
--- trunk/control-center-gnome/src/control-center.c (original)
+++ trunk/control-center-gnome/src/control-center.c Mon Feb 2 13:52:44 2009
@@ -21,6 +21,7 @@
#define ENABLE_NLS 1
#include "config.h"
#include
+#include
#include
#include
#include
@@ -114,6 +115,7 @@
AppShellData *app_data;
GSList *actions;
GnomeProgram *program;
+ GConfClient *client;
const gchar *widget_theming_name = "y2ccg-control-center";
//Fixme - do not hardcode the path - generate and -D it in the Makefile
@@ -134,6 +136,17 @@
}
}
+ /* Make gconf not handle the errors by default: libgnomeui installs an
+ * handler that creates a dialog to display the error. Since this
+ * application is mainly used as root, and since it can't connect to
+ * gconf when "su" (not "su -") is used, we will likely get gconf
+ * errors, and we want to ignore them.
+ * Also, keep a reference to the default gconf client we created to
+ * make sure this property kept set. */
+ g_type_init ();
+ client = gconf_client_get_default ();
+ gconf_client_set_error_handling (client, GCONF_CLIENT_HANDLE_NONE);
+
startup_id = g_strdup (g_getenv (DESKTOP_STARTUP_ID));
program = gnome_program_init ("YaST2 GNOME Control Center", "0.1", LIBGNOMEUI_MODULE,
argc, argv, NULL, NULL);
@@ -168,5 +181,7 @@
bonobo_object_unref (bonobo_app);
bonobo_debug_shutdown ();
g_free (startup_id);
+ g_object_unref (client);
+
return 0;
};
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org