aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-02-13 00:37:05 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-02-13 01:54:08 +0800
commit7a1677520d439aee68c5ab0268a951d0b411e3a0 (patch)
tree5b045d6a6ad24f1e3c53847bb116610208d089a8 /widgets/misc
parent1f68d0a2ec941a7f1b47aeb06cf5502b06b49156 (diff)
downloadgsoc2013-evolution-7a1677520d439aee68c5ab0268a951d0b411e3a0.tar.gz
gsoc2013-evolution-7a1677520d439aee68c5ab0268a951d0b411e3a0.tar.zst
gsoc2013-evolution-7a1677520d439aee68c5ab0268a951d0b411e3a0.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/misc')
-rw-r--r--widgets/misc/e-attachment-handler-image.c3
-rw-r--r--widgets/misc/e-attachment-handler-sendto.c3
-rw-r--r--widgets/misc/e-attachment-handler.c3
-rw-r--r--widgets/misc/e-attachment-paned.c4
-rw-r--r--widgets/misc/e-attachment-store.c4
-rw-r--r--widgets/misc/e-calendar.c4
-rw-r--r--widgets/misc/e-canvas-background.c4
-rw-r--r--widgets/misc/e-cell-renderer-combo.c8
-rw-r--r--widgets/misc/e-focus-tracker.c4
-rw-r--r--widgets/misc/e-picture-gallery.c8
-rw-r--r--widgets/misc/e-preview-pane.c4
-rw-r--r--widgets/misc/e-search-bar.c4
-rw-r--r--widgets/misc/e-selection-model-array.c4
13 files changed, 27 insertions, 30 deletions
diff --git a/widgets/misc/e-attachment-handler-image.c b/widgets/misc/e-attachment-handler-image.c
index 2eb646c3f1..8b57cc80b6 100644
--- a/widgets/misc/e-attachment-handler-image.c
+++ b/widgets/misc/e-attachment-handler-image.c
@@ -210,8 +210,7 @@ attachment_handler_image_constructed (GObject *object)
handler = E_ATTACHMENT_HANDLER (object);
/* Chain up to parent's constructed() method. */
- if (G_OBJECT_CLASS (e_attachment_handler_image_parent_class)->constructed)
- G_OBJECT_CLASS (e_attachment_handler_image_parent_class)->constructed (object);
+ G_OBJECT_CLASS (e_attachment_handler_image_parent_class)->constructed (object);
view = e_attachment_handler_get_view (handler);
diff --git a/widgets/misc/e-attachment-handler-sendto.c b/widgets/misc/e-attachment-handler-sendto.c
index bea3e2327f..2694e3d07a 100644
--- a/widgets/misc/e-attachment-handler-sendto.c
+++ b/widgets/misc/e-attachment-handler-sendto.c
@@ -185,8 +185,7 @@ attachment_handler_sendto_constructed (GObject *object)
handler = E_ATTACHMENT_HANDLER (object);
/* Chain up to parent's constructed() method. */
- if (G_OBJECT_CLASS (e_attachment_handler_sendto_parent_class)->constructed)
- G_OBJECT_CLASS (e_attachment_handler_sendto_parent_class)->constructed (object);
+ G_OBJECT_CLASS (e_attachment_handler_sendto_parent_class)->constructed (object);
view = e_attachment_handler_get_view (handler);
ui_manager = e_attachment_view_get_ui_manager (view);
diff --git a/widgets/misc/e-attachment-handler.c b/widgets/misc/e-attachment-handler.c
index 3f77136152..d388faca34 100644
--- a/widgets/misc/e-attachment-handler.c
+++ b/widgets/misc/e-attachment-handler.c
@@ -56,8 +56,7 @@ attachment_handler_constructed (GObject *object)
e_attachment_view_add_drag_actions (view, drag_actions);
/* Chain up to parent's constructed() method. */
- if (G_OBJECT_CLASS (e_attachment_handler_parent_class))
- G_OBJECT_CLASS (e_attachment_handler_parent_class)->constructed (object);
+ G_OBJECT_CLASS (e_attachment_handler_parent_class)->constructed (object);
}
static void
diff --git a/widgets/misc/e-attachment-paned.c b/widgets/misc/e-attachment-paned.c
index 3158c363d9..0eaada1e8e 100644
--- a/widgets/misc/e-attachment-paned.c
+++ b/widgets/misc/e-attachment-paned.c
@@ -350,8 +350,8 @@ attachment_paned_constructed (GObject *object)
key = "/apps/evolution/shell/attachment_view";
gconf_bridge_bind_property (bridge, key, object, "active-view");
- if (G_OBJECT_CLASS (e_attachment_paned_parent_class)->constructed)
- G_OBJECT_CLASS (e_attachment_paned_parent_class)->constructed (object);
+ /* Chain up to parent's constructed() method. */
+ G_OBJECT_CLASS (e_attachment_paned_parent_class)->constructed (object);
}
static EAttachmentViewPrivate *
diff --git a/widgets/misc/e-attachment-store.c b/widgets/misc/e-attachment-store.c
index d647a575dc..4068e5efdc 100644
--- a/widgets/misc/e-attachment-store.c
+++ b/widgets/misc/e-attachment-store.c
@@ -148,8 +148,8 @@ attachment_store_constructed (GObject *object)
key = "/apps/evolution/shell/file_chooser_folder";
gconf_bridge_bind_property (bridge, key, object, "current-folder-uri");
- if (G_OBJECT_CLASS (e_attachment_store_parent_class)->constructed)
- G_OBJECT_CLASS (e_attachment_store_parent_class)->constructed (object);
+ /* Chain up to parent's constructed() method. */
+ G_OBJECT_CLASS (e_attachment_store_parent_class)->constructed (object);
}
static void
diff --git a/widgets/misc/e-calendar.c b/widgets/misc/e-calendar.c
index c21a6a4547..9332345875 100644
--- a/widgets/misc/e-calendar.c
+++ b/widgets/misc/e-calendar.c
@@ -242,8 +242,8 @@ e_calendar_dispose (GObject *object)
cal->timeout_id = 0;
}
- if (G_OBJECT_CLASS (e_calendar_parent_class)->dispose)
- G_OBJECT_CLASS (e_calendar_parent_class)->dispose (object);
+ /* Chain up to parent's dispose() method. */
+ G_OBJECT_CLASS (e_calendar_parent_class)->dispose (object);
}
static void
diff --git a/widgets/misc/e-canvas-background.c b/widgets/misc/e-canvas-background.c
index c05ba2df49..431e0fde6e 100644
--- a/widgets/misc/e-canvas-background.c
+++ b/widgets/misc/e-canvas-background.c
@@ -105,8 +105,8 @@ ecb_dispose (GObject *object)
ecb->priv = NULL;
}
- if (G_OBJECT_CLASS (ecb_parent_class)->dispose)
- G_OBJECT_CLASS (ecb_parent_class)->dispose (object);
+ /* Chain up to parent's dispose() method. */
+ G_OBJECT_CLASS (ecb_parent_class)->dispose (object);
}
static void
diff --git a/widgets/misc/e-cell-renderer-combo.c b/widgets/misc/e-cell-renderer-combo.c
index ee0e47ddf5..5994c075c5 100644
--- a/widgets/misc/e-cell-renderer-combo.c
+++ b/widgets/misc/e-cell-renderer-combo.c
@@ -136,9 +136,9 @@ ecrc_set_prop (GObject *object, guint prop_id, const GValue *value, GParamSpec *
}
static void
-ecrc_finalize (GObject *obj)
+ecrc_finalize (GObject *object)
{
- ECellRendererCombo *cell = (ECellRendererCombo *) obj;
+ ECellRendererCombo *cell = (ECellRendererCombo *) object;
if (cell->priv->editable)
g_object_unref (cell->priv->editable);
@@ -150,8 +150,8 @@ ecrc_finalize (GObject *obj)
g_free (cell->priv);
- if (G_OBJECT_CLASS (e_cell_renderer_combo_parent_class)->finalize)
- G_OBJECT_CLASS (e_cell_renderer_combo_parent_class)->finalize (obj);
+ /* Chain up to parent's finalize() method. */
+ G_OBJECT_CLASS (e_cell_renderer_combo_parent_class)->finalize (object);
}
static void
diff --git a/widgets/misc/e-focus-tracker.c b/widgets/misc/e-focus-tracker.c
index 429a62af45..eb835b94bc 100644
--- a/widgets/misc/e-focus-tracker.c
+++ b/widgets/misc/e-focus-tracker.c
@@ -445,8 +445,8 @@ focus_tracker_constructed (GObject *object)
clipboard, "owner-change",
G_CALLBACK (e_focus_tracker_update_actions), object);
- if (G_OBJECT_CLASS (e_focus_tracker_parent_class)->constructed)
- G_OBJECT_CLASS (e_focus_tracker_parent_class)->constructed (object);
+ /* Chain up to parent's constructed() method. */
+ G_OBJECT_CLASS (e_focus_tracker_parent_class)->constructed (object);
}
static void
diff --git a/widgets/misc/e-picture-gallery.c b/widgets/misc/e-picture-gallery.c
index 209b00b662..084a6f49a0 100644
--- a/widgets/misc/e-picture-gallery.c
+++ b/widgets/misc/e-picture-gallery.c
@@ -333,8 +333,8 @@ picture_gallery_constructed (GObject *object)
GtkTargetList *list;
gint n_targets;
- if (G_OBJECT_CLASS (e_picture_gallery_parent_class)->constructed)
- G_OBJECT_CLASS (e_picture_gallery_parent_class)->constructed (object);
+ /* Chain up to parent's constructed() method. */
+ G_OBJECT_CLASS (e_picture_gallery_parent_class)->constructed (object);
icon_view = GTK_ICON_VIEW (object);
@@ -375,8 +375,8 @@ picture_gallery_dispose (GObject *object)
gallery->priv->monitor = NULL;
}
- if (G_OBJECT_CLASS (e_picture_gallery_parent_class)->dispose)
- G_OBJECT_CLASS (e_picture_gallery_parent_class)->dispose (object);
+ /* Chain up to parent's dispose() method. */
+ G_OBJECT_CLASS (e_picture_gallery_parent_class)->dispose (object);
}
static void
diff --git a/widgets/misc/e-preview-pane.c b/widgets/misc/e-preview-pane.c
index b6a06ccfe5..8cc1612129 100644
--- a/widgets/misc/e-preview-pane.c
+++ b/widgets/misc/e-preview-pane.c
@@ -144,8 +144,8 @@ preview_pane_constructed (GObject *object)
priv->search_bar = g_object_ref (widget);
gtk_widget_hide (widget);
- if (G_OBJECT_CLASS (e_preview_pane_parent_class)->constructed)
- G_OBJECT_CLASS (e_preview_pane_parent_class)->constructed (object);
+ /* Chain up to parent's constructed() method. */
+ G_OBJECT_CLASS (e_preview_pane_parent_class)->constructed (object);
}
static void
diff --git a/widgets/misc/e-search-bar.c b/widgets/misc/e-search-bar.c
index 0b0589bfa6..59476a61e1 100644
--- a/widgets/misc/e-search-bar.c
+++ b/widgets/misc/e-search-bar.c
@@ -381,8 +381,8 @@ search_bar_constructed (GObject *object)
G_BINDING_BIDIRECTIONAL |
G_BINDING_SYNC_CREATE);
- if (G_OBJECT_CLASS (e_search_bar_parent_class)->constructed)
- G_OBJECT_CLASS (e_search_bar_parent_class)->constructed (object);
+ /* Chain up to parent's constructed() method. */
+ G_OBJECT_CLASS (e_search_bar_parent_class)->constructed (object);
}
static void
diff --git a/widgets/misc/e-selection-model-array.c b/widgets/misc/e-selection-model-array.c
index 8f9a8f087d..e7185a0a3f 100644
--- a/widgets/misc/e-selection-model-array.c
+++ b/widgets/misc/e-selection-model-array.c
@@ -188,8 +188,8 @@ esma_dispose (GObject *object)
esma->eba = NULL;
}
- if (G_OBJECT_CLASS (e_selection_model_array_parent_class)->dispose)
- (* G_OBJECT_CLASS (e_selection_model_array_parent_class)->dispose) (object);
+ /* Chain up to parent's dispose() method. */
+ G_OBJECT_CLASS (e_selection_model_array_parent_class)->dispose (object);
}
static void