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_currency_edit_get_type is being replaced by that provided by G_DEFINE_TYPE_WITH_PRIVATE
This commit is contained in:
parent
71272548fb
commit
d63a6e2ea9
@ -96,37 +96,6 @@ typedef struct _GNCCurrencyEditPrivate
|
|||||||
/** @name Basic Object Implementation */
|
/** @name Basic Object Implementation */
|
||||||
/** @{ */
|
/** @{ */
|
||||||
|
|
||||||
/* Return the GType for the GNCCurrencyEdit currency selection widget.
|
|
||||||
*/
|
|
||||||
GType
|
|
||||||
gnc_currency_edit_get_type (void)
|
|
||||||
{
|
|
||||||
static GType currency_edit_type = 0;
|
|
||||||
|
|
||||||
if (currency_edit_type == 0)
|
|
||||||
{
|
|
||||||
static const GTypeInfo currency_edit_info =
|
|
||||||
{
|
|
||||||
sizeof (GNCCurrencyEditClass),
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
(GClassInitFunc) gnc_currency_edit_class_init,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
sizeof (GNCCurrencyEdit),
|
|
||||||
0, /* n_preallocs */
|
|
||||||
(GInstanceInitFunc) gnc_currency_edit_init,
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
currency_edit_type = g_type_register_static (GTK_TYPE_COMBO_BOX,
|
|
||||||
"GNCCurrencyEdit",
|
|
||||||
¤cy_edit_info, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
return currency_edit_type;
|
|
||||||
}
|
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
PROP_0,
|
PROP_0,
|
||||||
@ -185,7 +154,7 @@ gnc_currency_edit_get_property (GObject *object,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
G_DEFINE_TYPE_WITH_PRIVATE(GNCCurrencyEdit, gnc_currency_edit, GTK_TYPE_COMBO_BOX)
|
||||||
|
|
||||||
/** Initialize the GncCurrencyEdit class object.
|
/** Initialize the GncCurrencyEdit class object.
|
||||||
*
|
*
|
||||||
@ -199,8 +168,6 @@ gnc_currency_edit_class_init (GNCCurrencyEditClass *klass)
|
|||||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||||
parent_class = g_type_class_peek_parent (klass);
|
parent_class = g_type_class_peek_parent (klass);
|
||||||
|
|
||||||
g_type_class_add_private(klass, sizeof(GNCCurrencyEditPrivate));
|
|
||||||
|
|
||||||
gobject_class->set_property = gnc_currency_edit_set_property;
|
gobject_class->set_property = gnc_currency_edit_set_property;
|
||||||
gobject_class->get_property = gnc_currency_edit_get_property;
|
gobject_class->get_property = gnc_currency_edit_get_property;
|
||||||
gobject_class->finalize = gnc_currency_edit_finalize;
|
gobject_class->finalize = gnc_currency_edit_finalize;
|
||||||
|
Loading…
Reference in New Issue
Block a user