summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorey Berla <corey@berla.me>2022-07-17 23:19:20 -0700
committerAntónio Fernandes <antoniof@gnome.org>2023-01-10 02:01:27 +0000
commit7346be5725c10e675856e730a29b160f7380d997 (patch)
treef11f405f20210d2297dd2fe26c3d9c8e64087728
parent67f24aa1e37985bd5f079efe3d03b8000996315a (diff)
downloadnautilus-7346be5725c10e675856e730a29b160f7380d997.tar.gz
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.
-rw-r--r--src/nautilus-name-cell.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/nautilus-name-cell.c b/src/nautilus-name-cell.c
index 155d0baf5..b32addddd 100644
--- a/src/nautilus-name-cell.c
+++ b/src/nautilus-name-cell.c
@@ -285,20 +285,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,