mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
use G_DEFINE_TYPE_WITH_PRIVATE to replace g_type_class_add_private
gnc_search_date_get_type is being replaced by that provided by G_DEFINE_TYPE_WITH_PRIVATE
This commit is contained in:
parent
5b7d50f0c7
commit
bd8a687bd6
@ -62,33 +62,7 @@ struct _GNCSearchDatePrivate
|
||||
|
||||
static GNCSearchCoreTypeClass *parent_class;
|
||||
|
||||
GType
|
||||
gnc_search_date_get_type (void)
|
||||
{
|
||||
static GType type = 0;
|
||||
|
||||
if (!type)
|
||||
{
|
||||
GTypeInfo type_info =
|
||||
{
|
||||
sizeof(GNCSearchDateClass), /* class_size */
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc)gnc_search_date_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof(GNCSearchDate), /* */
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc)gnc_search_date_init,
|
||||
};
|
||||
|
||||
type = g_type_register_static (GNC_TYPE_SEARCH_CORE_TYPE,
|
||||
"GNCSearchDate",
|
||||
&type_info, 0);
|
||||
}
|
||||
|
||||
return type;
|
||||
}
|
||||
G_DEFINE_TYPE_WITH_PRIVATE(GNCSearchDate, gnc_search_date, GNC_TYPE_SEARCH_CORE_TYPE)
|
||||
|
||||
static void
|
||||
gnc_search_date_class_init (GNCSearchDateClass *klass)
|
||||
@ -109,8 +83,6 @@ gnc_search_date_class_init (GNCSearchDateClass *klass)
|
||||
gnc_search_core_type->get_widget = gncs_get_widget;
|
||||
gnc_search_core_type->get_predicate = gncs_get_predicate;
|
||||
gnc_search_core_type->clone = gncs_clone;
|
||||
|
||||
g_type_class_add_private(klass, sizeof(GNCSearchDatePrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user