Skip to content

Commit

Permalink
Merge Christoph Holterman's 'PR-G_ADD_PRIVATE-clean' into maint.
Browse files Browse the repository at this point in the history
  • Loading branch information
jralls committed Mar 19, 2019
2 parents b0d0ee1 + c1f5eb9 commit bc9d83c
Show file tree
Hide file tree
Showing 66 changed files with 339 additions and 2,083 deletions.
38 changes: 2 additions & 36 deletions gnucash/gnome-search/gnc-general-search.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,46 +75,14 @@ struct _GNCGeneralSearchPrivate
gint component_id;
};

G_DEFINE_TYPE_WITH_PRIVATE(GNCGeneralSearch, gnc_general_search, GTK_TYPE_BOX)

#define _PRIVATE(o) \
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GNC_TYPE_GENERAL_SEARCH, GNCGeneralSearchPrivate))

static GtkBoxClass *parent_class;
static guint general_search_signals[LAST_SIGNAL];


/**
* gnc_general_search_get_type:
*
* Returns the GType for the GNCGeneralSearch widget
*/
GType
gnc_general_search_get_type (void)
{
static GType general_search_type = 0;

if (!general_search_type)
{
static const GTypeInfo our_info =
{
sizeof (GNCGeneralSearchClass), /* class_size */
NULL, /* base_init */
NULL, /* base_finalize */
(GClassInitFunc) gnc_general_search_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GNCGeneralSearch), /* */
0, /* n_preallocs */
(GInstanceInitFunc) gnc_general_search_init,
};

general_search_type = g_type_register_static (GTK_TYPE_BOX,
"GNCGeneralSearch",
&our_info, 0);
}

return general_search_type;
}

static void
gnc_general_search_class_init (GNCGeneralSearchClass *klass)
{
Expand All @@ -134,8 +102,6 @@ gnc_general_search_class_init (GNCGeneralSearchClass *klass)
object_class->destroy = gnc_general_search_destroy;

klass->changed = NULL;

g_type_class_add_private(klass, sizeof(GNCGeneralSearchPrivate));
}

static void
Expand Down
33 changes: 2 additions & 31 deletions gnucash/gnome-search/search-account.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,40 +58,13 @@ struct _GNCSearchAccountPrivate
GtkWindow *parent;
};

G_DEFINE_TYPE_WITH_PRIVATE(GNCSearchAccount, gnc_search_account, GNC_TYPE_SEARCH_CORE_TYPE)

#define _PRIVATE(o) \
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GNC_TYPE_SEARCH_ACCOUNT, GNCSearchAccountPrivate))

static GNCSearchCoreTypeClass *parent_class;


GType
gnc_search_account_get_type (void)
{
static GType type = 0;

if (!type)
{
GTypeInfo type_info =
{
sizeof(GNCSearchAccountClass), /* class_size */
NULL, /* base_init */
NULL, /* base_finalize */
(GClassInitFunc)gnc_search_account_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof(GNCSearchAccount), /* */
0, /* n_preallocs */
(GInstanceInitFunc)gnc_search_account_init,
};

type = g_type_register_static (GNC_TYPE_SEARCH_CORE_TYPE,
"GNCSearchAccount",
&type_info, 0);
}

return type;
}

static void
gnc_search_account_class_init (GNCSearchAccountClass *klass)
{
Expand All @@ -109,8 +82,6 @@ gnc_search_account_class_init (GNCSearchAccountClass *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(GNCSearchAccountPrivate));
}

static void
Expand Down
32 changes: 2 additions & 30 deletions gnucash/gnome-search/search-boolean.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,39 +53,13 @@ struct _GNCSearchBooleanPrivate
gpointer dummy;
};

G_DEFINE_TYPE_WITH_PRIVATE(GNCSearchBoolean, gnc_search_boolean, GNC_TYPE_SEARCH_CORE_TYPE)

#define _PRIVATE(o) \
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GNC_TYPE_SEARCH_BOOLEAN, GNCSearchBooleanPrivate))

static GNCSearchCoreTypeClass *parent_class;

GType
gnc_search_boolean_get_type (void)
{
static GType type = 0;

if (!type)
{
GTypeInfo type_info =
{
sizeof(GNCSearchBooleanClass), /* class_size */
NULL, /* base_init */
NULL, /* base_finalize */
(GClassInitFunc)gnc_search_boolean_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof(GNCSearchBoolean), /* */
0, /* n_preallocs */
(GInstanceInitFunc)gnc_search_boolean_init,
};

type = g_type_register_static (GNC_TYPE_SEARCH_CORE_TYPE,
"GNCSearchBoolean",
&type_info, 0);
}

return type;
}

static void
gnc_search_boolean_class_init (GNCSearchBooleanClass *klass)
{
Expand All @@ -103,8 +77,6 @@ gnc_search_boolean_class_init (GNCSearchBooleanClass *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(GNCSearchBooleanPrivate));
}

static void
Expand Down
30 changes: 2 additions & 28 deletions gnucash/gnome-search/search-core-type.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,39 +55,15 @@ struct _GNCSearchCoreTypePrivate
gpointer dummy;
};

G_DEFINE_TYPE_WITH_PRIVATE(GNCSearchCoreType, gnc_search_core_type, G_TYPE_OBJECT)

#define _PRIVATE(o) \
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GNC_TYPE_SEARCH_CORE_TYPE, GNCSearchCoreTypePrivate))

static GObjectClass *parent_class;

static GHashTable *typeTable = NULL;

GType
gnc_search_core_type_get_type (void)
{
static GType type = 0;

if (type == 0)
{
GTypeInfo type_info =
{
sizeof (GNCSearchCoreTypeClass),
NULL,
NULL,
(GClassInitFunc)gnc_search_core_type_class_init,
NULL,
NULL,
sizeof (GNCSearchCoreType),
0,
(GInstanceInitFunc)gnc_search_core_type_init
};

type = g_type_register_static (G_TYPE_OBJECT, "GNCSearchCoreType", &type_info, 0);
}

return type;
}

static void
gnc_search_core_type_class_init (GNCSearchCoreTypeClass *klass)
{
Expand All @@ -102,8 +78,6 @@ gnc_search_core_type_class_init (GNCSearchCoreTypeClass *klass)
klass->validate = validate;
klass->grab_focus = grab_focus;
klass->editable_enters = editable_enters;

g_type_class_add_private(klass, sizeof(GNCSearchCoreTypePrivate));
}

static void
Expand Down
32 changes: 2 additions & 30 deletions gnucash/gnome-search/search-date.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,39 +57,13 @@ struct _GNCSearchDatePrivate
GtkWindow *parent;
};

G_DEFINE_TYPE_WITH_PRIVATE(GNCSearchDate, gnc_search_date, GNC_TYPE_SEARCH_CORE_TYPE)

#define _PRIVATE(o) \
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GNC_TYPE_SEARCH_DATE, 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;
}

static void
gnc_search_date_class_init (GNCSearchDateClass *klass)
{
Expand All @@ -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
Expand Down
32 changes: 2 additions & 30 deletions gnucash/gnome-search/search-double.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,39 +57,13 @@ struct _GNCSearchDoublePrivate
GtkWindow *parent;
};

G_DEFINE_TYPE_WITH_PRIVATE(GNCSearchDouble, gnc_search_double, GNC_TYPE_SEARCH_CORE_TYPE)

#define _PRIVATE(o) \
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GNC_TYPE_SEARCH_DOUBLE, GNCSearchDoublePrivate))

static GNCSearchCoreTypeClass *parent_class;

GType
gnc_search_double_get_type (void)
{
static GType type = 0;

if (!type)
{
GTypeInfo type_info =
{
sizeof(GNCSearchDoubleClass), /* class_size */
NULL, /* base_init */
NULL, /* base_finalize */
(GClassInitFunc)gnc_search_double_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof(GNCSearchDouble), /* */
0, /* n_preallocs */
(GInstanceInitFunc)gnc_search_double_init,
};

type = g_type_register_static (GNC_TYPE_SEARCH_CORE_TYPE,
"GNCSearchDouble",
&type_info, 0);
}

return type;
}

static void
gnc_search_double_class_init (GNCSearchDoubleClass *klass)
{
Expand All @@ -109,8 +83,6 @@ gnc_search_double_class_init (GNCSearchDoubleClass *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(GNCSearchDoublePrivate));
}

static void
Expand Down
32 changes: 2 additions & 30 deletions gnucash/gnome-search/search-int64.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,39 +58,13 @@ struct _GNCSearchInt64Private
GtkWindow *parent;
};

G_DEFINE_TYPE_WITH_PRIVATE(GNCSearchInt64, gnc_search_int64, GNC_TYPE_SEARCH_CORE_TYPE)

#define _PRIVATE(o) \
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GNC_TYPE_SEARCH_INT64, GNCSearchInt64Private))

static GNCSearchCoreTypeClass *parent_class;

GType
gnc_search_int64_get_type (void)
{
static GType type = 0;

if (!type)
{
GTypeInfo type_info =
{
sizeof(GNCSearchInt64Class), /* class_size */
NULL, /* base_init */
NULL, /* base_finalize */
(GClassInitFunc)gnc_search_int64_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof(GNCSearchInt64), /* */
0, /* n_preallocs */
(GInstanceInitFunc)gnc_search_int64_init,
};

type = g_type_register_static (GNC_TYPE_SEARCH_CORE_TYPE,
"GNCSearchInt64",
&type_info, 0);
}

return type;
}

static void
gnc_search_int64_class_init (GNCSearchInt64Class *klass)
{
Expand All @@ -110,8 +84,6 @@ gnc_search_int64_class_init (GNCSearchInt64Class *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(GNCSearchInt64Private));
}

static void
Expand Down
Loading

0 comments on commit bc9d83c

Please sign in to comment.