Do not use static GTypeInfo and GInterfaceInfo
Either g_type_register_static_simple (used by G_DEFINE_TYPE_EXTENDED) and G_IMPLEMENT_INTERFACE use automatic variables for GTypeInfo and GInterfaceInfo structs, while tutorials and source code often use static variables. This commit consistently adopts the former method. https://bugzilla.gnome.org/show_bug.cgi?id=600158
This commit is contained in:
committed by
Javier Jardón
parent
e41f4e85cf
commit
1e1131c959
@ -374,7 +374,7 @@ view_column_model_get_type (void)
|
||||
|
||||
if (!view_column_model_type)
|
||||
{
|
||||
static const GTypeInfo view_column_model_info =
|
||||
const GTypeInfo view_column_model_info =
|
||||
{
|
||||
sizeof (GtkListStoreClass),
|
||||
NULL, /* base_init */
|
||||
@ -387,21 +387,21 @@ view_column_model_get_type (void)
|
||||
(GInstanceInitFunc) view_column_model_init,
|
||||
};
|
||||
|
||||
static const GInterfaceInfo tree_model_info =
|
||||
const GInterfaceInfo tree_model_info =
|
||||
{
|
||||
(GInterfaceInitFunc) view_column_model_tree_model_init,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
static const GInterfaceInfo drag_source_info =
|
||||
const GInterfaceInfo drag_source_info =
|
||||
{
|
||||
(GInterfaceInitFunc) view_column_model_drag_source_init,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
static const GInterfaceInfo drag_dest_info =
|
||||
const GInterfaceInfo drag_dest_info =
|
||||
{
|
||||
(GInterfaceInitFunc) view_column_model_drag_dest_init,
|
||||
NULL,
|
||||
|
||||
@ -891,7 +891,7 @@ gtk_tree_model_types_get_type (void)
|
||||
|
||||
if (!model_types_type)
|
||||
{
|
||||
static const GTypeInfo model_types_info =
|
||||
const GTypeInfo model_types_info =
|
||||
{
|
||||
sizeof (GtkTreeModelTypesClass),
|
||||
NULL, /* base_init */
|
||||
@ -904,7 +904,7 @@ gtk_tree_model_types_get_type (void)
|
||||
(GInstanceInitFunc) gtk_tree_model_types_init
|
||||
};
|
||||
|
||||
static const GInterfaceInfo tree_model_info =
|
||||
const GInterfaceInfo tree_model_info =
|
||||
{
|
||||
(GInterfaceInitFunc) gtk_tree_model_types_tree_model_init,
|
||||
NULL,
|
||||
|
||||
Reference in New Issue
Block a user