mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Refactor: DEFINE_TYPE GncRecurrence < GtkBox
This commit is contained in:
parent
c632164d38
commit
fd56cb6b78
@ -70,8 +70,7 @@ typedef enum
|
||||
GNCR_YEAR,
|
||||
} UIPeriodType;
|
||||
|
||||
static GObjectClass *parent_class = NULL;
|
||||
|
||||
G_DEFINE_TYPE (GncRecurrence, gnc_recurrence, GTK_TYPE_BOX)
|
||||
|
||||
static UIPeriodType get_pt_ui(GncRecurrence *gr)
|
||||
{
|
||||
@ -341,7 +340,7 @@ gnc_recurrence_finalize(GObject *o)
|
||||
GncRecurrence *gr = GNC_RECURRENCE(o);
|
||||
|
||||
if (gr)
|
||||
G_OBJECT_CLASS (parent_class)->finalize (o);
|
||||
G_OBJECT_CLASS (gnc_recurrence_parent_class)->finalize (o);
|
||||
}
|
||||
|
||||
|
||||
@ -361,35 +360,9 @@ gnc_recurrence_class_init( GncRecurrenceClass *klass )
|
||||
G_TYPE_NONE,
|
||||
0);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
object_class->finalize = gnc_recurrence_finalize;
|
||||
}
|
||||
|
||||
|
||||
GType
|
||||
gnc_recurrence_get_type()
|
||||
{
|
||||
static GType type = 0;
|
||||
if (type == 0)
|
||||
{
|
||||
static GTypeInfo typeinfo =
|
||||
{
|
||||
sizeof(GncRecurrenceClass),
|
||||
NULL, NULL,
|
||||
(GClassInitFunc)gnc_recurrence_class_init,
|
||||
NULL, NULL,
|
||||
sizeof(GncRecurrence),
|
||||
0,
|
||||
(GInstanceInitFunc)gnc_recurrence_init
|
||||
};
|
||||
|
||||
type = g_type_register_static (GTK_TYPE_BOX, "GncRecurrence",
|
||||
&typeinfo, 0);
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
|
||||
GtkWidget *
|
||||
gnc_recurrence_new()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user