diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2012-06-24 19:31:28 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2012-06-25 08:31:42 +0800 |
commit | f960fd2dff5358f0e13eba7041d35855bf48c22e (patch) | |
tree | 92859c8ba093fa15a3bd7b888332d6e61a704a51 /calendar/gui | |
parent | 88db20f3e9ff38296c031671de963ae665fd8143 (diff) | |
download | gsoc2013-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 'calendar/gui')
-rw-r--r-- | calendar/gui/dialogs/comp-editor-page.c | 4 | ||||
-rw-r--r-- | calendar/gui/e-cal-model.c | 14 | ||||
-rw-r--r-- | calendar/gui/e-memo-table.c | 6 | ||||
-rw-r--r-- | calendar/gui/e-task-table.c | 6 |
4 files changed, 9 insertions, 21 deletions
diff --git a/calendar/gui/dialogs/comp-editor-page.c b/calendar/gui/dialogs/comp-editor-page.c index e24bca5c1e..356d4d78b2 100644 --- a/calendar/gui/dialogs/comp-editor-page.c +++ b/calendar/gui/dialogs/comp-editor-page.c @@ -51,7 +51,6 @@ enum { LAST_SIGNAL }; -static gpointer parent_class; static guint comp_editor_page_signals[LAST_SIGNAL]; G_DEFINE_TYPE (CompEditorPage, comp_editor_page, G_TYPE_OBJECT) @@ -119,7 +118,7 @@ comp_editor_page_dispose (GObject *object) } /* Chain up to parent's dispose() method. */ - G_OBJECT_CLASS (parent_class)->dispose (object); + G_OBJECT_CLASS (comp_editor_page_parent_class)->dispose (object); } static void @@ -127,7 +126,6 @@ comp_editor_page_class_init (CompEditorPageClass *class) { GObjectClass *object_class; - parent_class = g_type_class_peek_parent (class); g_type_class_add_private (class, sizeof (CompEditorPagePrivate)); object_class = G_OBJECT_CLASS (class); diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c index 90c411cee6..273e452c88 100644 --- a/calendar/gui/e-cal-model.c +++ b/calendar/gui/e-cal-model.c @@ -177,7 +177,6 @@ enum { LAST_SIGNAL }; -static gpointer parent_class; static guint signals[LAST_SIGNAL]; G_DEFINE_TYPE_WITH_CODE ( @@ -409,7 +408,7 @@ cal_model_constructed (GObject *object) e_extensible_load_extensions (E_EXTENSIBLE (object)); /* Chain up to parent's constructed() method. */ - G_OBJECT_CLASS (parent_class)->constructed (object); + G_OBJECT_CLASS (e_cal_model_parent_class)->constructed (object); } static void @@ -457,7 +456,7 @@ cal_model_dispose (GObject *object) } /* Chain up to parent's dispose() method. */ - G_OBJECT_CLASS (parent_class)->dispose (object); + G_OBJECT_CLASS (e_cal_model_parent_class)->dispose (object); } static void @@ -492,7 +491,7 @@ cal_model_finalize (GObject *object) g_hash_table_destroy (priv->notify_removed); /* Chain up to parent's finalize() method. */ - G_OBJECT_CLASS (parent_class)->finalize (object); + G_OBJECT_CLASS (e_cal_model_parent_class)->finalize (object); } static void @@ -501,7 +500,6 @@ e_cal_model_class_init (ECalModelClass *class) GObjectClass *object_class; ETableModelClass *etm_class; - parent_class = g_type_class_peek_parent (class); g_type_class_add_private (class, sizeof (ECalModelPrivate)); object_class = G_OBJECT_CLASS (class); @@ -3767,8 +3765,6 @@ copy_ecdv (ECellDateEditValue *ecdv) static void e_cal_model_component_finalize (GObject *object); -static GObjectClass *component_parent_class; - /* Class initialization function for the calendar component object */ static void e_cal_model_component_class_init (ECalModelComponentClass *class) @@ -3778,8 +3774,6 @@ e_cal_model_component_class_init (ECalModelComponentClass *class) object_class = (GObjectClass *) class; g_type_class_add_private (class, sizeof (ECalModelComponentPrivate)); - component_parent_class = g_type_class_peek_parent (class); - object_class->finalize = e_cal_model_component_finalize; } @@ -3830,7 +3824,7 @@ e_cal_model_component_finalize (GObject *object) comp_data->priv->categories_str = NULL; /* Chain up to parent's finalize() method. */ - G_OBJECT_CLASS (component_parent_class)->finalize (object); + G_OBJECT_CLASS (e_cal_model_component_parent_class)->finalize (object); } static void diff --git a/calendar/gui/e-memo-table.c b/calendar/gui/e-memo-table.c index 86f2c35a05..ab86209dd5 100644 --- a/calendar/gui/e-memo-table.c +++ b/calendar/gui/e-memo-table.c @@ -85,7 +85,6 @@ enum { LAST_SIGNAL }; -static gpointer parent_class; static guint signals[LAST_SIGNAL]; /* The icons to represent the task. */ @@ -332,7 +331,7 @@ memo_table_dispose (GObject *object) } /* Chain up to parent's dispose() method. */ - G_OBJECT_CLASS (parent_class)->dispose (object); + G_OBJECT_CLASS (e_memo_table_parent_class)->dispose (object); } static void @@ -434,7 +433,7 @@ memo_table_constructed (GObject *object) atk_object_set_name (a11y, _("Memos")); /* Chain up to parent's constructed() method. */ - G_OBJECT_CLASS (parent_class)->constructed (object); + G_OBJECT_CLASS (e_memo_table_parent_class)->constructed (object); } static gboolean @@ -1079,7 +1078,6 @@ e_memo_table_class_init (EMemoTableClass *class) GtkWidgetClass *widget_class; ETableClass *table_class; - parent_class = g_type_class_peek_parent (class); g_type_class_add_private (class, sizeof (EMemoTablePrivate)); object_class = G_OBJECT_CLASS (class); diff --git a/calendar/gui/e-task-table.c b/calendar/gui/e-task-table.c index f21d617c7f..56c4304ee2 100644 --- a/calendar/gui/e-task-table.c +++ b/calendar/gui/e-task-table.c @@ -91,7 +91,6 @@ enum { static struct tm e_task_table_get_current_time (ECellDateEdit *ecde, gpointer data); -static gpointer parent_class; static guint signals[LAST_SIGNAL]; /* The icons to represent the task. */ @@ -459,7 +458,7 @@ task_table_dispose (GObject *object) } /* Chain up to parent's dispose() method. */ - G_OBJECT_CLASS (parent_class)->dispose (object); + G_OBJECT_CLASS (e_task_table_parent_class)->dispose (object); } static void @@ -706,7 +705,7 @@ task_table_constructed (GObject *object) atk_object_set_name (a11y, _("Tasks")); /* Chain up to parent's constructed() method. */ - G_OBJECT_CLASS (parent_class)->constructed (object); + G_OBJECT_CLASS (e_task_table_parent_class)->constructed (object); } static gboolean @@ -1438,7 +1437,6 @@ e_task_table_class_init (ETaskTableClass *class) GtkWidgetClass *widget_class; ETableClass *table_class; - parent_class = g_type_class_peek_parent (class); g_type_class_add_private (class, sizeof (ETaskTablePrivate)); object_class = G_OBJECT_CLASS (class); |