Index: libgnome/gnome-init.c =================================================================== RCS file: /cvs/gnome/libgnome/libgnome/gnome-init.c,v retrieving revision 1.113 diff -p -u -u -p -r1.113 gnome-init.c --- libgnome/gnome-init.c 9 Jan 2006 16:48:56 -0000 1.113 +++ libgnome/gnome-init.c 16 Jan 2006 21:31:42 -0000 @@ -146,7 +146,7 @@ gnome_bonobo_activation_module_info_get bonobo_activation_popt_options }; - module_info.expansion1 = bonobo_activation_get_goption_group; + module_info.get_goption_group_func = bonobo_activation_get_goption_group; if (module_info.version == NULL) { module_info.version = g_strdup_printf @@ -549,7 +549,7 @@ libgnome_module_info_get (void) }; int i = 0; - module_info.expansion1 = libgnome_module_get_goption_group; + module_info.get_goption_group_func = libgnome_module_get_goption_group; if (module_info.requirements == NULL) { static GnomeModuleRequirement req[4]; Index: libgnome/gnome-program.c =================================================================== RCS file: /cvs/gnome/libgnome/libgnome/gnome-program.c,v retrieving revision 1.83 diff -p -u -u -p -r1.83 gnome-program.c --- libgnome/gnome-program.c 9 Jan 2006 16:48:56 -0000 1.83 +++ libgnome/gnome-program.c 16 Jan 2006 21:31:42 -0000 @@ -1370,13 +1370,9 @@ gnome_program_preinit (GnomeProgram *pro /* 5a. Add the modules' GOptionGroup:s to our context */ for (i = 0; (a_module = g_ptr_array_index (program_modules, i)); i++) { - GetGOptionGroupFunc get_goption_group = (GetGOptionGroupFunc) a_module->expansion1; - - if (get_goption_group) { - GOptionGroup *option_group = get_goption_group (); - + if (a_module->get_goption_group_func) { g_option_context_add_group (program->_priv->goption_context, - option_group); + a_module->get_goption_group_func ()); } } Index: libgnome/gnome-program.h =================================================================== RCS file: /cvs/gnome/libgnome/libgnome/gnome-program.h,v retrieving revision 1.30 diff -p -u -u -p -r1.30 gnome-program.h --- libgnome/gnome-program.h 29 Sep 2005 18:34:19 -0000 1.30 +++ libgnome/gnome-program.h 16 Jan 2006 21:31:42 -0000 @@ -32,12 +32,14 @@ #define GNOME_PROGRAM_H #include -#include #include #include #include +#ifndef GNOME_DISABLE_DEPRECATED +#include +#endif G_BEGIN_DECLS @@ -110,9 +112,6 @@ gnome_program_locate_file GSList **ret_locations); #define GNOME_PARAM_NONE NULL -#define GNOME_PARAM_POPT_TABLE "popt-table" -#define GNOME_PARAM_POPT_FLAGS "popt-flags" -#define GNOME_PARAM_POPT_CONTEXT "popt-context" #define GNOME_PARAM_GOPTION_CONTEXT "goption-context" #define GNOME_PARAM_CREATE_DIRECTORIES "create-directories" #define GNOME_PARAM_ENABLE_SOUND "enable-sound" @@ -130,6 +129,12 @@ gnome_program_locate_file #define GNOME_PARAM_HUMAN_READABLE_NAME "human-readable-name" #define GNOME_PARAM_GNOME_PATH "gnome-path" +#ifndef GNOME_DISABLE_DEPRECATED +#define GNOME_PARAM_POPT_TABLE "popt-table" +#define GNOME_PARAM_POPT_FLAGS "popt-flags" +#define GNOME_PARAM_POPT_CONTEXT "popt-context" +#endif + /***** application modules (aka libraries :) ******/ #define GNOME_TYPE_MODULE_INFO (gnome_module_info_get_type ()) @@ -149,6 +154,7 @@ typedef void (*GnomeModuleClassInitHook) const GnomeModuleInfo *mod_info); typedef void (*GnomeModuleHook) (GnomeProgram *program, GnomeModuleInfo *mod_info); +typedef GOptionGroup* (*GnomeModuleGetGOptionGroupFunc) (void); struct _GnomeModuleInfo { const char *name; @@ -159,14 +165,18 @@ struct _GnomeModuleInfo { GnomeModuleHook instance_init; GnomeModuleHook pre_args_parse, post_args_parse; +#ifdef GNOME_DISABLE_DEPRECATED + struct poptOption *_options; +#else struct poptOption *options; +#endif GnomeModuleInitHook init_pass; GnomeModuleClassInitHook class_init; const char *opt_prefix; - gpointer expansion1; + GnomeModuleGetGOptionGroupFunc get_goption_group_func; }; /* This function should be called before gnomelib_preinit() - it's an