aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/gui/widgets')
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.c17
-rw-r--r--addressbook/gui/widgets/e-minicard-view-widget.c43
-rw-r--r--addressbook/gui/widgets/e-minicard.c36
-rw-r--r--addressbook/gui/widgets/eab-contact-display.h2
4 files changed, 46 insertions, 52 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c
index 98576a9c2f..eb4c2a6a4a 100644
--- a/addressbook/gui/widgets/e-addressbook-view.c
+++ b/addressbook/gui/widgets/e-addressbook-view.c
@@ -74,7 +74,7 @@
#define d(x)
static void eab_view_init (EABView *card);
-static void eab_view_class_init (EABViewClass *klass);
+static void eab_view_class_init (EABViewClass *class);
static void eab_view_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
static void eab_view_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
@@ -109,8 +109,7 @@ static void search_activated (ESearchBar *esb, EABView *view);
static void search_menu_activated (ESearchBar *esb, int id, EABView *view);
static GList *get_master_list (gboolean force_rebuild);
-#define PARENT_TYPE GTK_TYPE_VBOX
-static GtkVBoxClass *parent_class = NULL;
+static gpointer parent_class;
/* The arguments we take */
enum {
@@ -194,21 +193,20 @@ eab_view_get_type (void)
(GInstanceInitFunc) eab_view_init,
};
- type = g_type_register_static (PARENT_TYPE, "EABView", &info, 0);
+ type = g_type_register_static (GTK_TYPE_VBOX, "EABView", &info, 0);
}
return type;
}
static void
-eab_view_class_init (EABViewClass *klass)
+eab_view_class_init (EABViewClass *class)
{
GObjectClass *object_class;
- object_class = G_OBJECT_CLASS(klass);
-
- parent_class = gtk_type_class (PARENT_TYPE);
+ parent_class = g_type_class_peek_parent (class);
+ object_class = G_OBJECT_CLASS(class);
object_class->set_property = eab_view_set_property;
object_class->get_property = eab_view_get_property;
object_class->dispose = eab_view_dispose;
@@ -377,8 +375,7 @@ eab_view_dispose (GObject *object)
eav->search_rule = NULL;
}
- if (G_OBJECT_CLASS(parent_class)->dispose)
- G_OBJECT_CLASS(parent_class)->dispose(object);
+ G_OBJECT_CLASS (parent_class)->dispose (object);
}
static void
diff --git a/addressbook/gui/widgets/e-minicard-view-widget.c b/addressbook/gui/widgets/e-minicard-view-widget.c
index 60f76d6edc..9ad2fe2a60 100644
--- a/addressbook/gui/widgets/e-minicard-view-widget.c
+++ b/addressbook/gui/widgets/e-minicard-view-widget.c
@@ -30,7 +30,7 @@
#include "e-minicard-view-widget.h"
static void e_minicard_view_widget_init (EMinicardViewWidget *widget);
-static void e_minicard_view_widget_class_init (EMinicardViewWidgetClass *klass);
+static void e_minicard_view_widget_class_init (EMinicardViewWidgetClass *class);
static void e_minicard_view_widget_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
static void e_minicard_view_widget_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
static void e_minicard_view_widget_dispose (GObject *object);
@@ -40,8 +40,7 @@ static void e_minicard_view_widget_style_set (GtkWidget *widget, GtkStyle *p
static void e_minicard_view_widget_realize (GtkWidget *widget);
static gboolean e_minicard_view_widget_real_focus_in_event (GtkWidget *widget, GdkEventFocus *event);
-
-static ECanvasClass *parent_class = NULL;
+static gpointer parent_class;
/* The arguments we take */
enum {
@@ -86,21 +85,31 @@ e_minicard_view_widget_get_type (void)
}
static void
-e_minicard_view_widget_class_init (EMinicardViewWidgetClass *klass)
+e_minicard_view_widget_class_init (EMinicardViewWidgetClass *class)
{
GObjectClass *object_class;
GtkWidgetClass *widget_class;
ECanvasClass *canvas_class;
- object_class = (GObjectClass*) klass;
- widget_class = GTK_WIDGET_CLASS (klass);
- canvas_class = E_CANVAS_CLASS (klass);
+ parent_class = g_type_class_peek_parent (class);
+
+ object_class = G_OBJECT_CLASS (class);
+ object_class->set_property = e_minicard_view_widget_set_property;
+ object_class->get_property = e_minicard_view_widget_get_property;
+ object_class->dispose = e_minicard_view_widget_dispose;
+
+ widget_class = GTK_WIDGET_CLASS (class);
+ widget_class->style_set = e_minicard_view_widget_style_set;
+ widget_class->realize = e_minicard_view_widget_realize;
+ widget_class->size_allocate = e_minicard_view_widget_size_allocate;
+ widget_class->focus_in_event = e_minicard_view_widget_real_focus_in_event;
- parent_class = gtk_type_class (e_canvas_get_type ());
+ canvas_class = E_CANVAS_CLASS (class);
+ canvas_class->reflow = e_minicard_view_widget_reflow;
- object_class->set_property = e_minicard_view_widget_set_property;
- object_class->get_property = e_minicard_view_widget_get_property;
- object_class->dispose = e_minicard_view_widget_dispose;
+ class->selection_change = NULL;
+ class->column_width_changed = NULL;
+ class->right_click = NULL;
g_object_class_install_property (object_class, PROP_BOOK,
g_param_spec_object ("book",
@@ -156,18 +165,6 @@ e_minicard_view_widget_class_init (EMinicardViewWidgetClass *klass)
NULL, NULL,
eab_marshal_INT__POINTER,
G_TYPE_INT, 1, G_TYPE_POINTER);
-
- widget_class->style_set = e_minicard_view_widget_style_set;
- widget_class->realize = e_minicard_view_widget_realize;
- widget_class->size_allocate = e_minicard_view_widget_size_allocate;
- widget_class->focus_in_event = e_minicard_view_widget_real_focus_in_event;
-
-
- canvas_class->reflow = e_minicard_view_widget_reflow;
-
- klass->selection_change = NULL;
- klass->column_width_changed = NULL;
- klass->right_click = NULL;
}
static void
diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c
index f32674d55e..e35b9fb52f 100644
--- a/addressbook/gui/widgets/e-minicard.c
+++ b/addressbook/gui/widgets/e-minicard.c
@@ -45,7 +45,7 @@
#include "a11y/addressbook/ea-addressbook.h"
static void e_minicard_init (EMinicard *card);
-static void e_minicard_class_init (EMinicardClass *klass);
+static void e_minicard_class_init (EMinicardClass *class);
static void e_minicard_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
static void e_minicard_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
static void e_minicard_dispose (GObject *object);
@@ -61,7 +61,7 @@ static void remodel( EMinicard *e_minicard );
static gint e_minicard_drag_begin (EMinicard *minicard, GdkEvent *event);
-static GnomeCanvasGroupClass *parent_class = NULL;
+static gpointer parent_class;
#define d(x)
@@ -131,19 +131,26 @@ e_minicard_get_type (void)
}
static void
-e_minicard_class_init (EMinicardClass *klass)
+e_minicard_class_init (EMinicardClass *class)
{
- GObjectClass *object_class = (GObjectClass*) klass;
- GnomeCanvasItemClass *item_class = (GnomeCanvasItemClass *) klass;
+ GObjectClass *object_class;
+ GnomeCanvasItemClass *item_class;
- object_class->set_property = e_minicard_set_property;
- object_class->get_property = e_minicard_get_property;
- object_class->dispose = e_minicard_dispose;
- object_class->finalize = e_minicard_finalize;
+ parent_class = g_type_class_peek_parent (class);
- klass->style_set = e_minicard_style_set;
+ object_class = G_OBJECT_CLASS (class);
+ object_class->set_property = e_minicard_set_property;
+ object_class->get_property = e_minicard_get_property;
+ object_class->dispose = e_minicard_dispose;
+ object_class->finalize = e_minicard_finalize;
- parent_class = gtk_type_class (gnome_canvas_group_get_type ());
+ item_class = GNOME_CANVAS_ITEM_CLASS (class);
+ item_class->realize = e_minicard_realize;
+ item_class->unrealize = e_minicard_unrealize;
+ item_class->event = e_minicard_event;
+
+ class->style_set = e_minicard_style_set;
+ class->selected = NULL;
g_object_class_install_property (object_class, PROP_WIDTH,
g_param_spec_double ("width",
@@ -224,13 +231,6 @@ e_minicard_class_init (EMinicardClass *klass)
G_TYPE_NONE, 1,
GTK_TYPE_STYLE);
- /* GnomeCanvasItem method overrides */
- item_class->realize = e_minicard_realize;
- item_class->unrealize = e_minicard_unrealize;
- item_class->event = e_minicard_event;
-
- klass->selected = NULL;
-
/* init the accessibility support for e_minicard */
e_minicard_a11y_init();
}
diff --git a/addressbook/gui/widgets/eab-contact-display.h b/addressbook/gui/widgets/eab-contact-display.h
index e1b84346e7..3661cb7034 100644
--- a/addressbook/gui/widgets/eab-contact-display.h
+++ b/addressbook/gui/widgets/eab-contact-display.h
@@ -51,7 +51,7 @@ struct _EABContactDisplayClass {
GtkHTMLClass parent_class;
};
-GtkType eab_contact_display_get_type (void);
+GType eab_contact_display_get_type (void);
GtkWidget * eab_contact_display_new (void);
void eab_contact_display_render (EABContactDisplay *display, EContact *contact,