Re: GnomeSettingsModule



On 28.03.2007 15:55, Rodrigo Moya wrote:
> GType
> gnome_settings_module_get_type (void)
> {
> 	static GType module_type = 0;
>   
> 	if (!module_type) {
> 		static const GTypeInfo module_info = {
> 			sizeof (GnomeSettingsModuleClass),
> 			NULL,		/* base_init */
> 			NULL,		/* base_finalize */
> 			(GClassInitFunc) gnome_settings_module_class_init,
> 			NULL,		/* class_finalize */
> 			NULL,		/* class_data */
> 			sizeof (GnomeSettingsModule),
> 			0,		/* n_preallocs */
> 			(GInstanceInitFunc) gnome_settings_module_init,
> 		};

If I'm not mistaken, Christian Persch and others were on a quest to make
these non-static sometime during 2.17.

> 	/* virtual methods */
> 	gboolean (* initialize) (GnomeSettingsModule *module);
> 	gboolean (* load) (GnomeSettingsModule *module);
> 	gboolean (* unload) (GnomeSettingsModule *module);
> 	gboolean (* reload_settings) (GnomeSettingsModule *module);

This looks a little inconsistent to me. Why "load" and "unload",
but "reload_settings" instead of "reload"?

reload might also offer a default implementation which could simply be

unload ();
load ();

Not quite sure if it's worth it, though.

Jens



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