Refactor: DECLARE_FINAL GNCDateFormat < GtkBox

This commit is contained in:
Richard Cohen 2023-06-12 19:54:26 +01:00
parent 33e08df849
commit ceb21a6ace
2 changed files with 4 additions and 14 deletions

View File

@ -99,7 +99,7 @@ gnc_date_format_class_init (GNCDateFormatClass *klass)
g_signal_new ("format_changed",
G_OBJECT_CLASS_TYPE (gobject_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GNCDateFormatClass, format_changed),
0,
NULL,
NULL,
g_cclosure_marshal_VOID__VOID,

View File

@ -36,24 +36,14 @@ extern "C" {
#endif
#define GNC_TYPE_DATE_FORMAT (gnc_date_format_get_type ())
#define GNC_DATE_FORMAT(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gnc_date_format_get_type(), GNCDateFormat)
#define GNC_DATE_FORMAT_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gnc_date_format_get_type(), GNCDateFormatClass)
#define GNC_IS_DATE_FORMAT(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gnc_date_format_get_type ())
G_DECLARE_FINAL_TYPE (GNCDateFormat, gnc_date_format, GNC, DATE_FORMAT, GtkBox)
/**
**/
typedef struct
struct _GNCDateFormat
{
GtkBox hbox;
} GNCDateFormat;
typedef struct
{
GtkBoxClass hbox_class;
void (*format_changed) (GNCDateFormat *gdf);
} GNCDateFormatClass;
GType gnc_date_format_get_type (void);
};
GtkWidget *gnc_date_format_new (void);
GtkWidget *gnc_date_format_new_without_label (void);