- parent_type = E_TYPE_SOURCE_CAMEL;
- type = g_type_register_static (parent_type, type_name, &type_info, 0);
-
- /* Since we have first access to the newly registered GType, and
- * because initializing its class structure requires some of the
- * arguments we were passed, we'll complete class initialization
- * here rather than trying to do it all in subclass_init(). */
-
- class = g_type_class_ref (type);
- settings_class = g_type_class_ref (settings_type);
-
- /* Initialize more class members. */
- class->settings_type = G_OBJECT_CLASS_TYPE (settings_class);
- class->parent_class.name = g_intern_string (extension_name);
-
- /* For each property in the CamelSettings class, register
- * an equivalent GObject property in this class and add an
- * E_SOURCE_PARAM_SETTING flag so the value gets written to
- * the ESource's key file. */
-
- properties = g_object_class_list_properties (
- settings_class, &n_properties);
-
- for (ii = 0; ii < n_properties; ii++) {
- GParamSpec *pspec;
-
- /* Some properties in CamelSettings may be covered
- * by other ESourceExtensions. Skip them here. */
- if (subclass_get_binding_index (properties[ii]) >= 0)
- continue;
-
- pspec = param_spec_clone (properties[ii]);
- pspec->flags |= E_SOURCE_PARAM_SETTING;
-
- /* Clear the G_PARAM_CONSTRUCT flag. We apply default
- * property values to our GValue array during instance
- * initialization. */
- pspec->flags &= ~G_PARAM_CONSTRUCT;
-
- g_object_class_install_property (
- G_OBJECT_CLASS (class), prop_id++, pspec);
- }
-
- g_free (properties);
-
- g_type_class_unref (class);
- g_type_class_unref (settings_class);