aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-09-04 05:26:09 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-09-04 06:54:45 +0800
commitd94208b114ff961ad2db920cc00d93c2beb3ae48 (patch)
tree802e5e1a1e0bdc5d4eb897bbd5ca643cf36913e1 /shell
parent580e9c1b397e36b3503aca0cb0a80b86b2b2e5b1 (diff)
downloadgsoc2013-evolution-d94208b114ff961ad2db920cc00d93c2beb3ae48.tar
gsoc2013-evolution-d94208b114ff961ad2db920cc00d93c2beb3ae48.tar.gz
gsoc2013-evolution-d94208b114ff961ad2db920cc00d93c2beb3ae48.tar.bz2
gsoc2013-evolution-d94208b114ff961ad2db920cc00d93c2beb3ae48.tar.lz
gsoc2013-evolution-d94208b114ff961ad2db920cc00d93c2beb3ae48.tar.xz
gsoc2013-evolution-d94208b114ff961ad2db920cc00d93c2beb3ae48.tar.zst
gsoc2013-evolution-d94208b114ff961ad2db920cc00d93c2beb3ae48.zip
Homing in on a reference counting issue in EShellContent.
Diffstat (limited to 'shell')
-rw-r--r--shell/e-shell-content.c28
1 files changed, 6 insertions, 22 deletions
diff --git a/shell/e-shell-content.c b/shell/e-shell-content.c
index fe4ea24e72..610a5b0d4e 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 */