[evolution] Homing in on a reference counting issue in EShellContent.
- From: Matthew Barnes <mbarnes src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [evolution] Homing in on a reference counting issue in EShellContent.
- Date: Thu, 3 Sep 2009 22:54:56 +0000 (UTC)
commit d94208b114ff961ad2db920cc00d93c2beb3ae48
Author: Matthew Barnes <mbarnes redhat com>
Date: Thu Sep 3 17:26:09 2009 -0400
Homing in on a reference counting issue in EShellContent.
shell/e-shell-content.c | 28 ++++++----------------------
1 files changed, 6 insertions(+), 22 deletions(-)
---
diff --git a/shell/e-shell-content.c b/shell/e-shell-content.c
index fe4ea24..610a5b0 100644
--- a/shell/e-shell-content.c
+++ b/shell/e-shell-content.c
@@ -508,6 +508,11 @@ shell_content_dispose (GObject *object)
priv->shell_view = NULL;
}
+ if (priv->search_bar != NULL) {
+ g_object_unref (priv->search_bar);
+ priv->search_bar = NULL;
+ }
+
if (priv->filter_label != NULL) {
g_object_unref (priv->filter_label);
priv->filter_label = NULL;
@@ -666,26 +671,6 @@ shell_content_size_allocate (GtkWidget *widget,
}
static void
-shell_content_remove (GtkContainer *container,
- GtkWidget *widget)
-{
- EShellContentPrivate *priv;
-
- priv = E_SHELL_CONTENT_GET_PRIVATE (container);
-
- /* Look in the internal widgets first. */
-
- if (widget == priv->search_bar) {
- gtk_widget_unparent (priv->search_bar);
- gtk_widget_queue_resize (GTK_WIDGET (container));
- return;
- }
-
- /* Chain up to parent's remove() method. */
- GTK_CONTAINER_CLASS (parent_class)->remove (container, widget);
-}
-
-static void
shell_content_forall (GtkContainer *container,
gboolean include_internals,
GtkCallback callback,
@@ -725,7 +710,6 @@ shell_content_class_init (EShellContentClass *class)
widget_class->size_allocate = shell_content_size_allocate;
container_class = GTK_CONTAINER_CLASS (class);
- container_class->remove = shell_content_remove;
container_class->forall = shell_content_forall;
class->new_search_context = rule_context_new;
@@ -874,7 +858,7 @@ shell_content_init (EShellContent *shell_content)
widget = gtk_hbox_new (FALSE, 24);
gtk_widget_set_parent (widget, GTK_WIDGET (shell_content));
- shell_content->priv->search_bar = g_object_ref_sink (widget);
+ shell_content->priv->search_bar = g_object_ref (widget);
gtk_widget_show (widget);
/* Filter Combo Widgets */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]