aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/component/e-address-widget.c
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/gui/component/e-address-widget.c')
-rw-r--r--addressbook/gui/component/e-address-widget.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/addressbook/gui/component/e-address-widget.c b/addressbook/gui/component/e-address-widget.c
index 2b58fd3db9..61b65f9e4f 100644
--- a/addressbook/gui/component/e-address-widget.c
+++ b/addressbook/gui/component/e-address-widget.c
@@ -54,7 +54,7 @@ e_address_widget_class_init (EAddressWidgetClass *klass)
GtkObjectClass *object_class = (GtkObjectClass *) klass;
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
- parent_class = GTK_OBJECT_CLASS (gtk_type_class (gtk_event_box_get_type ()));
+ parent_class = g_type_class_peek_parent (klass);
object_class->destroy = e_address_widget_destroy;
@@ -94,23 +94,25 @@ e_address_widget_button_press_handler (GtkWidget *w, GdkEventButton *ev)
return FALSE;
}
-GtkType
+GType
e_address_widget_get_type (void)
{
- static GtkType aw_type = 0;
+ static GType aw_type = 0;
if (!aw_type) {
- GtkTypeInfo aw_info = {
- "EAddressWidget",
- sizeof (EAddressWidget),
+ static const GTypeInfo aw_info = {
sizeof (EAddressWidgetClass),
- (GtkClassInitFunc) e_address_widget_class_init,
- (GtkObjectInitFunc) e_address_widget_init,
- NULL, NULL, /* reserved... but for what sinister purpose? */
- (GtkClassInitFunc) NULL
+ NULL, /* base_init */
+ NULL, /* base_finalize */
+ (GClassInitFunc) e_address_widget_class_init,
+ NULL, /* class_finalize */
+ NULL, /* class_data */
+ sizeof (EAddressWidget),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) e_address_widget_init,
};
- aw_type = gtk_type_unique (gtk_event_box_get_type (), &aw_info);
+ aw_type = g_type_register_static (gtk_event_box_get_type (), "EAddressWidget", &aw_info, 0);
}
return aw_type;
@@ -224,7 +226,7 @@ e_address_widget_construct (EAddressWidget *addr)
GtkWidget *
e_address_widget_new (void)
{
- EAddressWidget *addr = gtk_type_new (e_address_widget_get_type ());
+ EAddressWidget *addr = g_object_new (E_TYPE_ADDRESS_WIDGET, NULL);
e_address_widget_construct (addr);
return GTK_WIDGET (addr);
}