mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Refactor: DEFINE_TYPE GnucashRegister < GtkGrid
This commit is contained in:
parent
39a1bfd10d
commit
2213e63e30
@ -69,7 +69,6 @@ enum
|
|||||||
|
|
||||||
/* This static indicates the debugging module that this .o belongs to. */
|
/* This static indicates the debugging module that this .o belongs to. */
|
||||||
static QofLogModule log_module = GNC_MOD_REGISTER;
|
static QofLogModule log_module = GNC_MOD_REGISTER;
|
||||||
static GtkGrid *register_parent_class;
|
|
||||||
static guint register_signals[LAST_SIGNAL];
|
static guint register_signals[LAST_SIGNAL];
|
||||||
|
|
||||||
|
|
||||||
@ -95,6 +94,8 @@ struct _GnucashRegisterClass
|
|||||||
|
|
||||||
/** Implementation *****************************************************/
|
/** Implementation *****************************************************/
|
||||||
|
|
||||||
|
G_DEFINE_TYPE (GnucashRegister, gnucash_register, GTK_TYPE_GRID)
|
||||||
|
|
||||||
void
|
void
|
||||||
gnucash_register_add_cell_types (void)
|
gnucash_register_add_cell_types (void)
|
||||||
{
|
{
|
||||||
@ -367,8 +368,6 @@ gnucash_register_class_init (GnucashRegisterClass *klass)
|
|||||||
|
|
||||||
gtk_widget_class_set_css_name (GTK_WIDGET_CLASS(klass), "gnc-id-register");
|
gtk_widget_class_set_css_name (GTK_WIDGET_CLASS(klass), "gnc-id-register");
|
||||||
|
|
||||||
register_parent_class = g_type_class_peek_parent (klass);
|
|
||||||
|
|
||||||
register_signals[ACTIVATE_CURSOR] =
|
register_signals[ACTIVATE_CURSOR] =
|
||||||
g_signal_new("activate_cursor",
|
g_signal_new("activate_cursor",
|
||||||
G_TYPE_FROM_CLASS(gobject_class),
|
G_TYPE_FROM_CLASS(gobject_class),
|
||||||
@ -428,37 +427,6 @@ gnucash_register_init (GnucashRegister *g_reg)
|
|||||||
gtk_grid_set_column_homogeneous (GTK_GRID(table), FALSE);
|
gtk_grid_set_column_homogeneous (GTK_GRID(table), FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
GType
|
|
||||||
gnucash_register_get_type (void)
|
|
||||||
{
|
|
||||||
static GType gnucash_register_type = 0;
|
|
||||||
|
|
||||||
if (!gnucash_register_type)
|
|
||||||
{
|
|
||||||
static const GTypeInfo gnucash_register_info =
|
|
||||||
{
|
|
||||||
sizeof (GnucashRegisterClass),
|
|
||||||
NULL, /* base_init */
|
|
||||||
NULL, /* base_finalize */
|
|
||||||
(GClassInitFunc) gnucash_register_class_init,
|
|
||||||
NULL, /* class_finalize */
|
|
||||||
NULL, /* class_data */
|
|
||||||
sizeof (GnucashRegister),
|
|
||||||
0, /* n_preallocs */
|
|
||||||
(GInstanceInitFunc) gnucash_register_init,
|
|
||||||
};
|
|
||||||
|
|
||||||
gnucash_register_type = g_type_register_static
|
|
||||||
(gtk_grid_get_type (),
|
|
||||||
"GnucashRegister",
|
|
||||||
&gnucash_register_info, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
return gnucash_register_type;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
gnucash_register_attach_popup (GnucashRegister *reg,
|
gnucash_register_attach_popup (GnucashRegister *reg,
|
||||||
GtkWidget *popup,
|
GtkWidget *popup,
|
||||||
|
Loading…
Reference in New Issue
Block a user