Re: gnomelib_init (take 3)

On Wed, 17 Nov 1999 wrote:

> Here's take 3 of my patch to fix the crash that gnomelib_init caused. I've also
> fixed it in gnome-init.c and the test programs so they call the
> gnome_program_init function instead. Hopefully I've done it right this time :)

OK, improvements are seen. Now: 

> +  gnome_program_init (app_id, app_version, 1, fakeargv, NULL);

You need to pass arguments to gnome_program_init() that tell it what to
initialize. In this case, it would be

gnome_program_init(app_id, app_version, 1, fakeargv, LIBGNOME_INIT, NULL);

(LIBGNOME_INIT is a macro in gnomelib-init.h that passes the right params
so libgnome is initialized. The gnome_program stuff doesn't use other
parts of libgnome nor initialize it by default.)

> --- gnome-libs/libgnomeui/gnome-init.c	Tue Nov  9 21:38:35 1999
> +++ /usr/local/src/Gnome/gnome-libs/libgnomeui/gnome-init.c	Wed Nov 17 17:13:20 1999
> @@ -738,5 +738,5 @@
>  	g_return_val_if_fail(gnome_initialized == FALSE, -1);
> -	gnomelib_init (app_id, app_version);
> +	gnome_program_init (app_id, app_version, argc, argv, NULL);
>  	gnome_register_options();

This is in the middle of code that is commented out and is just there for
reference purposes. Welcome to the development branch! :-)

> There's also another patch that sets gnome-config to return the
> compatability libraries if --enable-gnome-compat is used.

Are you sure that is all it does? I have not looked to double-check, but I
think $GNOME_LIBS gets used to calculate the libraries that libgnomeui
gets linked against, for example. We really don't want libgnomeui getting
linked against libgnome10compat.

-- Elliot
Do not meddle in the affairs of dragons,
for you are crunchy and good with ketchup. 

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]