[nautilus/wip/apoos-maximus/gsoc2020: 3/8] properties-window: Set boolean object data correctly
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/apoos-maximus/gsoc2020: 3/8] properties-window: Set boolean object data correctly
- Date: Thu, 17 Dec 2020 19:08:20 +0000 (UTC)
commit 86d8768abf40a87643229504272d6f26e9c4997e
Author: António Fernandes <antoniof gnome org>
Date: Thu Dec 17 18:40:18 2020 +0000
properties-window: Set boolean object data correctly
It's wrong to set a pointer to an object as data without incrementing
its refcount.
But there is actually no need to pass a real pointer as data here, as
we actually want a boolean.
Use a pointer conversion macros instead.
src/nautilus-properties-window.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c
index 05b00d67f..d9c980fa8 100644
--- a/src/nautilus-properties-window.c
+++ b/src/nautilus-properties-window.c
@@ -944,7 +944,7 @@ clear_extension_pages (NautilusPropertiesWindow *self)
page = gtk_notebook_get_nth_page
(GTK_NOTEBOOK (self->notebook), i);
- if (g_object_get_data (G_OBJECT (page), "is-extension-page"))
+ if (GPOINTER_TO_INT (g_object_get_data (G_OBJECT (page), "is-extension-page")))
{
gtk_notebook_remove_page
(GTK_NOTEBOOK (self->notebook), i);
@@ -4338,7 +4338,7 @@ append_extension_pages (NautilusPropertiesWindow *self)
g_object_set_data (G_OBJECT (page_widget),
"is-extension-page",
- page);
+ GINT_TO_POINTER (TRUE));
g_object_unref (page_widget);
g_object_unref (label);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]