[nautilus/wip/antoniof/new-list-view-continuation: 8/34] view-icon-controller: Return G_SOURCE_REMOVE on idle function
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/antoniof/new-list-view-continuation: 8/34] view-icon-controller: Return G_SOURCE_REMOVE on idle function
- Date: Mon, 11 Apr 2022 23:57:52 +0000 (UTC)
commit 7cedbe2a2b0419add1e13e0db699429368df4bd6
Author: António Fernandes <antoniof gnome org>
Date: Tue Apr 5 00:02:17 2022 +0100
view-icon-controller: Return G_SOURCE_REMOVE on idle function
It must return a boolean value, not void.
src/nautilus-view-icon-controller.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/nautilus-view-icon-controller.c b/src/nautilus-view-icon-controller.c
index ad971cbe3..f356f0a5d 100644
--- a/src/nautilus-view-icon-controller.c
+++ b/src/nautilus-view-icon-controller.c
@@ -1291,7 +1291,7 @@ finalize (GObject *object)
G_OBJECT_CLASS (nautilus_view_icon_controller_parent_class)->finalize (object);
}
-static void
+static gboolean
prioritize_thumbnailing_on_idle (NautilusViewIconController *self)
{
gdouble page_size;
@@ -1310,7 +1310,7 @@ prioritize_thumbnailing_on_idle (NautilusViewIconController *self)
first_index = get_first_visible_item (self);
if (first_index == G_MAXUINT)
{
- return;
+ return G_SOURCE_REMOVE;
}
first_item = g_list_model_get_item (G_LIST_MODEL (self->model), first_index);
@@ -1344,7 +1344,7 @@ prioritize_thumbnailing_on_idle (NautilusViewIconController *self)
g_autoptr (NautilusViewItemModel) item = NULL;
item = g_list_model_get_item (G_LIST_MODEL (self->model), last_index - i);
- g_return_if_fail (item != NULL);
+ g_return_val_if_fail (item != NULL, G_SOURCE_REMOVE);
file = nautilus_view_item_model_get_file (NAUTILUS_VIEW_ITEM_MODEL (item));
if (file != NULL && nautilus_file_is_thumbnailing (file))
@@ -1353,6 +1353,8 @@ prioritize_thumbnailing_on_idle (NautilusViewIconController *self)
nautilus_thumbnail_prioritize (uri);
}
}
+
+ return G_SOURCE_REMOVE;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]