aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/widgets/e-minicard-view.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-06-24 19:31:28 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-06-25 08:31:42 +0800
commitf960fd2dff5358f0e13eba7041d35855bf48c22e (patch)
tree92859c8ba093fa15a3bd7b888332d6e61a704a51 /addressbook/gui/widgets/e-minicard-view.c
parent88db20f3e9ff38296c031671de963ae665fd8143 (diff)
downloadgsoc2013-evolution-f960fd2dff5358f0e13eba7041d35855bf48c22e.tar.gz
gsoc2013-evolution-f960fd2dff5358f0e13eba7041d35855bf48c22e.tar.zst
gsoc2013-evolution-f960fd2dff5358f0e13eba7041d35855bf48c22e.zip
Reduce usage of g_type_class_peek_parent().
G_DEFINE_TYPE macros define a static "parent_class" variable.
Diffstat (limited to 'addressbook/gui/widgets/e-minicard-view.c')
-rw-r--r--addressbook/gui/widgets/e-minicard-view.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/addressbook/gui/widgets/e-minicard-view.c b/addressbook/gui/widgets/e-minicard-view.c
index 502ab5f315..bc63ab8221 100644
--- a/addressbook/gui/widgets/e-minicard-view.c
+++ b/addressbook/gui/widgets/e-minicard-view.c
@@ -45,8 +45,6 @@ static void e_minicard_view_drag_data_get (GtkWidget *widget,
guint time,
EMinicardView *view);
-static EReflowClass *parent_class = NULL;
-
/* The arguments we take */
enum {
PROP_0,
@@ -374,7 +372,7 @@ e_minicard_view_dispose (GObject *object)
view->adapter = NULL;
/* Chain up to parent's dispose() method. */
- G_OBJECT_CLASS (parent_class)->dispose (object);
+ G_OBJECT_CLASS (e_minicard_view_parent_class)->dispose (object);
}
static guint
@@ -421,10 +419,8 @@ e_minicard_view_event (GnomeCanvasItem *item,
break;
}
- if (GNOME_CANVAS_ITEM_CLASS (parent_class)->event)
- return GNOME_CANVAS_ITEM_CLASS (parent_class)->event (item, event);
- else
- return FALSE;
+ return GNOME_CANVAS_ITEM_CLASS (e_minicard_view_parent_class)->
+ event (item, event);
}
static gint
@@ -436,9 +432,8 @@ e_minicard_view_selection_event (EReflow *reflow,
gint return_val = FALSE;
view = E_MINICARD_VIEW (reflow);
- if (parent_class->selection_event) {
- return_val = parent_class->selection_event (reflow, item, event);
- }
+ return_val = E_REFLOW_CLASS (e_minicard_view_parent_class)->
+ selection_event (reflow, item, event);
switch (event->type) {
case GDK_FOCUS_CHANGE:
@@ -476,8 +471,6 @@ e_minicard_view_class_init (EMinicardViewClass *class)
item_class = (GnomeCanvasItemClass *) class;
reflow_class = (EReflowClass *) class;
- parent_class = g_type_class_peek_parent (class);
-
object_class->set_property = e_minicard_view_set_property;
object_class->get_property = e_minicard_view_get_property;
object_class->dispose = e_minicard_view_dispose;