gnumeric r16941 - in trunk: . src
- From: mortenw svn gnome org
- To: svn-commits-list gnome org
- Subject: gnumeric r16941 - in trunk: . src
- Date: Sat, 1 Nov 2008 23:50:00 +0000 (UTC)
Author: mortenw
Date: Sat Nov 1 23:50:00 2008
New Revision: 16941
URL: http://svn.gnome.org/viewvc/gnumeric?rev=16941&view=rev
Log:
2008-11-01 Morten Welinder <terra gnome org>
* src/main-application.c (call_gnome_authentication_manager_init):
Call gnome_authentication_manager_init only if someone linked it
in.
Modified:
trunk/ChangeLog
trunk/src/main-application.c
Modified: trunk/src/main-application.c
==============================================================================
--- trunk/src/main-application.c (original)
+++ trunk/src/main-application.c Sat Nov 1 23:50:00 2008
@@ -53,7 +53,6 @@
#include <libgnome/gnome-program.h>
#include <libgnome/gnome-init.h>
#include <libgnomeui/gnome-ui-init.h>
-#include <libgnomeui/gnome-authentication-manager.h>
#endif
#ifdef GNM_USE_HILDON
@@ -170,6 +169,24 @@
}
}
+/* If something links in the authentication manager, initialize it. */
+static void
+call_gnome_authentication_manager_init (void)
+{
+ GModule *self = g_module_open (NULL, 0);
+ gboolean ok;
+ gpointer gami = NULL;
+ void (*_gnome_authentication_manager_init) (void);
+
+ if (!self) return;
+ ok = g_module_symbol (self, "gnome_authentication_manager_init", &gami);
+ g_module_close (self);
+ if (!ok || gami == NULL) return;
+
+ _gnome_authentication_manager_init = (void (*) (void))gami;
+ _gnome_authentication_manager_init ();
+}
+
static void
gnumeric_arg_parse (int argc, char **argv)
{
@@ -239,9 +256,7 @@
if (!funcdump) {
gtk_init (&argc, &argv);
-#ifdef GNM_WITH_GNOME
- gnome_authentication_manager_init ();
-#endif
+ call_gnome_authentication_manager_init ();
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]