[nautilus/wip/antoniof/new-list-view-continuation] name-cell: Cleanup handler on_item_is_loading_changed()
- From: Corey Berla <coreyberla src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [nautilus/wip/antoniof/new-list-view-continuation] name-cell: Cleanup handler on_item_is_loading_changed()
- Date: Fri,  5 Aug 2022 16:51:01 +0000 (UTC)
commit 510f1c73f7e26b148471647581c0cbf1d649d7eb
Author: Corey Berla <corey berla me>
Date:   Sun Jul 17 23:19:20 2022 -0700
    name-cell: Cleanup handler on_item_is_loading_changed()
    
    The handler warns that NAUTILUS_IS_NAME_CELL fails.  Clean up
    the handler to match others in the signal group.
 src/nautilus-name-cell.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)
---
diff --git a/src/nautilus-name-cell.c b/src/nautilus-name-cell.c
index e5b54a112..a1e52e377 100644
--- a/src/nautilus-name-cell.c
+++ b/src/nautilus-name-cell.c
@@ -294,20 +294,14 @@ on_loading_timeout (gpointer user_data)
 }
 
 static void
-on_item_is_loading_changed (GObject    *object,
-                            GParamSpec *pspec,
-                            gpointer    user_data)
+on_item_is_loading_changed (NautilusNameCell *self)
 {
-    NautilusNameCell *self = NAUTILUS_NAME_CELL (user_data);
     gboolean is_loading;
+    NautilusViewItem *item = nautilus_view_cell_get_item (NAUTILUS_VIEW_CELL (self));
 
-    if (object != G_OBJECT (nautilus_view_cell_get_item (NAUTILUS_VIEW_CELL (self))))
-    {
-        return;
-    }
 
     g_clear_handle_id (&self->loading_timeout_id, g_source_remove);
-    g_object_get (object, "is-loading", &is_loading, NULL);
+    g_object_get (item, "is-loading", &is_loading, NULL);
     if (is_loading)
     {
         self->loading_timeout_id = g_timeout_add_seconds (LOADING_TIMEOUT_SECONDS,
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]