[gnome-builder/gnome-builder-43] libide/gtk: remove depth updating



commit 092eead3dd35b785d211bb34891a88418cd07245
Author: Christian Hergert <chergert redhat com>
Date:   Tue Sep 20 14:28:10 2022 -0700

    libide/gtk: remove depth updating
    
    This apparently isn't necessary even though GtkTreeExpander does it.
    
    <Company> you don't need list_row_notify_depth() btw because depth never changes
    <Company> the listrowitem will go away before that happens

 src/libide/gtk/ide-tree-expander.c | 19 -------------------
 1 file changed, 19 deletions(-)
---
diff --git a/src/libide/gtk/ide-tree-expander.c b/src/libide/gtk/ide-tree-expander.c
index f4a8c0e82..361d66a64 100644
--- a/src/libide/gtk/ide-tree-expander.c
+++ b/src/libide/gtk/ide-tree-expander.c
@@ -39,7 +39,6 @@ struct _IdeTreeExpander
   GIcon           *icon;
   GIcon           *expanded_icon;
 
-  gulong           list_row_notify_depth;
   gulong           list_row_notify_expanded;
 };
 
@@ -123,17 +122,6 @@ ide_tree_expander_update_icon (IdeTreeExpander *self)
   gtk_image_set_from_gicon (GTK_IMAGE (self->image), icon);
 }
 
-static void
-ide_tree_expander_notify_depth_cb (IdeTreeExpander *self,
-                                   GParamSpec      *pspec,
-                                   GtkTreeListRow  *list_row)
-{
-  g_assert (IDE_IS_TREE_EXPANDER (self));
-  g_assert (GTK_IS_TREE_LIST_ROW (list_row));
-
-  ide_tree_expander_update_depth (self);
-}
-
 static void
 ide_tree_expander_notify_expanded_cb (IdeTreeExpander *self,
                                       GParamSpec      *pspec,
@@ -657,7 +645,6 @@ ide_tree_expander_clear_list_row (IdeTreeExpander *self)
   if (self->list_row == NULL)
     return;
 
-  g_clear_signal_handler (&self->list_row_notify_depth, self->list_row);
   g_clear_signal_handler (&self->list_row_notify_expanded, self->list_row);
 
   g_clear_object (&self->list_row);
@@ -698,12 +685,6 @@ ide_tree_expander_set_list_row (IdeTreeExpander *self,
                                  G_CALLBACK (ide_tree_expander_notify_expanded_cb),
                                  self,
                                  G_CONNECT_SWAPPED);
-      self->list_row_notify_depth =
-        g_signal_connect_object (self->list_row,
-                                 "notify::depth",
-                                 G_CALLBACK (ide_tree_expander_notify_depth_cb),
-                                 self,
-                                 G_CONNECT_SWAPPED);
       ide_tree_expander_update_depth (self);
       ide_tree_expander_update_icon (self);
     }


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