diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-02-13 00:37:05 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-06-30 00:41:34 +0800 |
commit | 274697623e2a6749a3b173c28f4832d9e88019e3 (patch) | |
tree | 5edbcc1f1cff8b9b00c49bbdea505647570bd3ed /widgets/table | |
parent | 2952f3482a58a6c325a80a7fbd7ef6c5f727507d (diff) | |
download | gsoc2013-evolution-274697623e2a6749a3b173c28f4832d9e88019e3.tar gsoc2013-evolution-274697623e2a6749a3b173c28f4832d9e88019e3.tar.gz gsoc2013-evolution-274697623e2a6749a3b173c28f4832d9e88019e3.tar.bz2 gsoc2013-evolution-274697623e2a6749a3b173c28f4832d9e88019e3.tar.lz gsoc2013-evolution-274697623e2a6749a3b173c28f4832d9e88019e3.tar.xz gsoc2013-evolution-274697623e2a6749a3b173c28f4832d9e88019e3.tar.zst gsoc2013-evolution-274697623e2a6749a3b173c28f4832d9e88019e3.zip |
Remove NULL checks for GObject methods.
As of GLib 2.28 all GObject virtual methods, including constructed(),
are safe to chain up to unconditionally. Remove unnecessary checks.
Diffstat (limited to 'widgets/table')
-rw-r--r-- | widgets/table/e-cell-pixbuf.c | 8 | ||||
-rw-r--r-- | widgets/table/e-table-click-to-add.c | 4 | ||||
-rw-r--r-- | widgets/table/e-table-col.c | 4 | ||||
-rw-r--r-- | widgets/table/e-table-field-chooser-item.c | 4 | ||||
-rw-r--r-- | widgets/table/e-table-field-chooser.c | 4 | ||||
-rw-r--r-- | widgets/table/e-table-group-leaf.c | 4 | ||||
-rw-r--r-- | widgets/table/e-table-group.c | 4 | ||||
-rw-r--r-- | widgets/table/e-table-header-item.c | 4 | ||||
-rw-r--r-- | widgets/table/e-table-header.c | 4 | ||||
-rw-r--r-- | widgets/table/e-table-item.c | 4 | ||||
-rw-r--r-- | widgets/table/e-table-model.c | 9 | ||||
-rw-r--r-- | widgets/table/e-table-selection-model.c | 4 |
12 files changed, 20 insertions, 37 deletions
diff --git a/widgets/table/e-cell-pixbuf.c b/widgets/table/e-cell-pixbuf.c index 9687e7d392..3bf671b48a 100644 --- a/widgets/table/e-cell-pixbuf.c +++ b/widgets/table/e-cell-pixbuf.c @@ -246,13 +246,6 @@ pixbuf_max_width (ECellView *ecell_view, gint model_col, gint view_col) } static void -pixbuf_dispose (GObject *object) -{ - if (G_OBJECT_CLASS (e_cell_pixbuf_parent_class)->dispose) - (* G_OBJECT_CLASS (e_cell_pixbuf_parent_class)->dispose) (object); -} - -static void pixbuf_set_property (GObject *object, guint prop_id, const GValue *value, @@ -324,7 +317,6 @@ e_cell_pixbuf_class_init (ECellPixbufClass *class) GObjectClass *object_class = G_OBJECT_CLASS (class); ECellClass *ecc = E_CELL_CLASS (class); - object_class->dispose = pixbuf_dispose; object_class->set_property = pixbuf_set_property; object_class->get_property = pixbuf_get_property; diff --git a/widgets/table/e-table-click-to-add.c b/widgets/table/e-table-click-to-add.c index d7a1e7f237..773aefc674 100644 --- a/widgets/table/e-table-click-to-add.c +++ b/widgets/table/e-table-click-to-add.c @@ -183,8 +183,8 @@ etcta_dispose (GObject *object) g_object_unref (etcta->selection); etcta->selection = NULL; - if (G_OBJECT_CLASS (etcta_parent_class)->dispose) - (*G_OBJECT_CLASS (etcta_parent_class)->dispose) (object); + /* Chain up to parent's dispose() method. */ + G_OBJECT_CLASS (etcta_parent_class)->dispose (object); } static void diff --git a/widgets/table/e-table-col.c b/widgets/table/e-table-col.c index 1238d5c017..2eb688e54f 100644 --- a/widgets/table/e-table-col.c +++ b/widgets/table/e-table-col.c @@ -74,8 +74,8 @@ etc_dispose (GObject *object) g_free (etc->icon_name); etc->icon_name = NULL; - if (G_OBJECT_CLASS (e_table_col_parent_class)->dispose) - G_OBJECT_CLASS (e_table_col_parent_class)->dispose (object); + /* Chain up to parent's dispose() method. */ + G_OBJECT_CLASS (e_table_col_parent_class)->dispose (object); } static void diff --git a/widgets/table/e-table-field-chooser-item.c b/widgets/table/e-table-field-chooser-item.c index dafd0b79fe..51ab6c1139 100644 --- a/widgets/table/e-table-field-chooser-item.c +++ b/widgets/table/e-table-field-chooser-item.c @@ -82,8 +82,8 @@ etfci_dispose (GObject *object) pango_font_description_free (etfci->font_desc); etfci->font_desc = NULL; - if (G_OBJECT_CLASS (etfci_parent_class)->dispose) - (*G_OBJECT_CLASS (etfci_parent_class)->dispose) (object); + /* Chain up to parent's dispose() method. */ + G_OBJECT_CLASS (etfci_parent_class)->dispose (object); } static gint diff --git a/widgets/table/e-table-field-chooser.c b/widgets/table/e-table-field-chooser.c index e038271b86..20ecb6edec 100644 --- a/widgets/table/e-table-field-chooser.c +++ b/widgets/table/e-table-field-chooser.c @@ -232,8 +232,8 @@ e_table_field_chooser_dispose (GObject *object) g_object_unref (etfc->header); etfc->header = NULL; - if (G_OBJECT_CLASS (e_table_field_chooser_parent_class)->dispose) - (* G_OBJECT_CLASS (e_table_field_chooser_parent_class)->dispose) (object); + /* Chain up to parent's dispose() method. */ + G_OBJECT_CLASS (e_table_field_chooser_parent_class)->dispose (object); } GtkWidget* diff --git a/widgets/table/e-table-group-leaf.c b/widgets/table/e-table-group-leaf.c index 2f287c2abf..7ec55301a0 100644 --- a/widgets/table/e-table-group-leaf.c +++ b/widgets/table/e-table-group-leaf.c @@ -106,8 +106,8 @@ etgl_dispose (GObject *object) etgl->selection_model = NULL; } - if (G_OBJECT_CLASS (etgl_parent_class)->dispose) - G_OBJECT_CLASS (etgl_parent_class)->dispose (object); + /* Chain up to parent's dispose() method. */ + G_OBJECT_CLASS (etgl_parent_class)->dispose (object); } static void diff --git a/widgets/table/e-table-group.c b/widgets/table/e-table-group.c index 2b6f3e971a..8f67a02ba6 100644 --- a/widgets/table/e-table-group.c +++ b/widgets/table/e-table-group.c @@ -73,8 +73,8 @@ etg_dispose (GObject *object) etg->model = NULL; } - if (G_OBJECT_CLASS (etg_parent_class)->dispose) - G_OBJECT_CLASS (etg_parent_class)->dispose (object); + /* Chain up to parent's dispose() method. */ + G_OBJECT_CLASS (etg_parent_class)->dispose (object); } /** diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c index 2ae10b87f3..1c7f4a2c54 100644 --- a/widgets/table/e-table-header-item.c +++ b/widgets/table/e-table-header-item.c @@ -137,8 +137,8 @@ ethi_dispose (GObject *object) { g_object_unref (ethi->config); ethi->config = NULL; - if (G_OBJECT_CLASS (ethi_parent_class)->dispose) - (*G_OBJECT_CLASS (ethi_parent_class)->dispose) (object); + /* Chain up to parent's dispose() method. */ + G_OBJECT_CLASS (ethi_parent_class)->dispose (object); } static gint diff --git a/widgets/table/e-table-header.c b/widgets/table/e-table-header.c index df772a3c80..f648a8d765 100644 --- a/widgets/table/e-table-header.c +++ b/widgets/table/e-table-header.c @@ -181,8 +181,8 @@ eth_finalize (GObject *object) eth->col_count = 0; eth->columns = NULL; - if (G_OBJECT_CLASS (e_table_header_parent_class)->finalize) - G_OBJECT_CLASS (e_table_header_parent_class)->finalize (object); + /* Chain up to parent's finalize() method. */ + G_OBJECT_CLASS (e_table_header_parent_class)->finalize (object); } static void diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c index 98ce069e81..51e3c9fecd 100644 --- a/widgets/table/e-table-item.c +++ b/widgets/table/e-table-item.c @@ -1426,8 +1426,8 @@ eti_dispose (GObject *object) g_free (eti->height_cache); eti->height_cache = NULL; - if (G_OBJECT_CLASS (eti_parent_class)->dispose) - (*G_OBJECT_CLASS (eti_parent_class)->dispose) (object); + /* Chain up to parent's dispose() method. */ + G_OBJECT_CLASS (eti_parent_class)->dispose (object); } static void diff --git a/widgets/table/e-table-model.c b/widgets/table/e-table-model.c index 308cdb0c58..3bf5ec5c8f 100644 --- a/widgets/table/e-table-model.c +++ b/widgets/table/e-table-model.c @@ -264,19 +264,10 @@ e_table_model_value_to_string (ETableModel *e_table_model, gint col, gconstpoint } static void -e_table_model_finalize (GObject *object) -{ - if (G_OBJECT_CLASS (e_table_model_parent_class)->finalize) - (* G_OBJECT_CLASS (e_table_model_parent_class)->finalize)(object); -} - -static void e_table_model_class_init (ETableModelClass *class) { GObjectClass *object_class = G_OBJECT_CLASS (class); - object_class->finalize = e_table_model_finalize; - e_table_model_signals[MODEL_NO_CHANGE] = g_signal_new ("model_no_change", G_TYPE_FROM_CLASS (object_class), diff --git a/widgets/table/e-table-selection-model.c b/widgets/table/e-table-selection-model.c index 7c11d1bd4a..18c0f5ea03 100644 --- a/widgets/table/e-table-selection-model.c +++ b/widgets/table/e-table-selection-model.c @@ -237,8 +237,8 @@ etsm_dispose (GObject *object) drop_model (etsm); free_hash (etsm); - if (G_OBJECT_CLASS (e_table_selection_model_parent_class)->dispose) - G_OBJECT_CLASS (e_table_selection_model_parent_class)->dispose (object); + /* Chain up to parent's dispose() method. */ + G_OBJECT_CLASS (e_table_selection_model_parent_class)->dispose (object); } static void |