problem in xfce4-panel code

edscott wilson garcia edscott at imp.mx
Tue Feb 11 23:56:46 CET 2003


Jasper:

  There is a problem in the panel code. In "my.gettext.h" you have:

#if ENABLE_NLS
# include <libintl.h>
#else
# define gettext(Msgid) ((const char *) (Msgid))
#endif

<libintl.h> defines gettext as a function. If NLS is not enabled, the
compiler will define it as a macro. Everything is fine here, except when
you get to line 322 of controls.c:

	gtk_item_factory_set_translate_func(factory, 
					    (GtkTranslateFunc) gettext,
					    NULL, NULL);
Here you are casting gettext as a GtkTranslateFunc. This cannot be done
to the macro defined above. Alternate code should be provided to replace
line 322 when ENABLE_NLS is not defined. Otherwise the configure script
should fail with a big warning if ENABLE_NLS is not defined.

saludos,

Edscott






More information about the Xfce4-dev mailing list