[gtk+] Bug 601512 - Remove unnecessary check in GtkTreeModelFilter



commit 087348a55d28aa43cd9fa1eb21f7947326a548d2
Author: Alberto Garcia <agarcia igalia com>
Date:   Wed Nov 11 12:14:16 2009 +0100

    Bug 601512 -  Remove unnecessary check in GtkTreeModelFilter
    
    gtk_tree_model_filter_set_visible_func() is checking for
    priv->visible_func, but that is always going to be NULL since there's
    no way to call this function twice.
    
    Besides that the code itself is wrong, since it tries to call
    priv->visible_destroy without making sure that it's not NULL

 gtk/gtktreemodelfilter.c |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtktreemodelfilter.c b/gtk/gtktreemodelfilter.c
index 074a7a4..a3398e6 100644
--- a/gtk/gtktreemodelfilter.c
+++ b/gtk/gtktreemodelfilter.c
@@ -3058,14 +3058,6 @@ gtk_tree_model_filter_set_visible_func (GtkTreeModelFilter            *filter,
   g_return_if_fail (func != NULL);
   g_return_if_fail (filter->priv->visible_method_set == FALSE);
 
-  if (filter->priv->visible_func)
-    {
-      GDestroyNotify d = filter->priv->visible_destroy;
-
-      filter->priv->visible_destroy = NULL;
-      d (filter->priv->visible_data);
-    }
-
   filter->priv->visible_func = func;
   filter->priv->visible_data = data;
   filter->priv->visible_destroy = destroy;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]