[nautilus/wip/antoniof/new-list-view-continuation: 81/81] name-cell: Cleanup handler on_item_is_loading_changed()
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/antoniof/new-list-view-continuation: 81/81] name-cell: Cleanup handler on_item_is_loading_changed()
- Date: Sun, 7 Aug 2022 01:52:39 +0000 (UTC)
commit 3042977ff9b0414476928705c03cc908992525b1
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 d67357319..03caedc91 100644
--- a/src/nautilus-name-cell.c
+++ b/src/nautilus-name-cell.c
@@ -274,20 +274,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]