[gnome-builder] libide/tweaks: fix item property access
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] libide/tweaks: fix item property access
- Date: Tue, 2 Aug 2022 21:24:31 +0000 (UTC)
commit 00517d0c7743a3213d976c276fcb14a619fd7b5b
Author: Christian Hergert <chergert redhat com>
Date: Tue Aug 2 14:24:05 2022 -0700
libide/tweaks: fix item property access
And clear after inflating.
src/libide/tweaks/ide-tweaks-factory.c | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/src/libide/tweaks/ide-tweaks-factory.c b/src/libide/tweaks/ide-tweaks-factory.c
index 574277ff5..cf491de6b 100644
--- a/src/libide/tweaks/ide-tweaks-factory.c
+++ b/src/libide/tweaks/ide-tweaks-factory.c
@@ -56,6 +56,7 @@ ide_tweaks_factory_dispose (GObject *object)
IdeTweaksFactory *self = (IdeTweaksFactory *)object;
g_clear_object (&self->model);
+ g_clear_object (&self->item);
G_OBJECT_CLASS (ide_tweaks_factory_parent_class)->dispose (object);
}
@@ -74,6 +75,10 @@ ide_tweaks_factory_get_property (GObject *object,
g_value_set_object (value, ide_tweaks_factory_get_model (self));
break;
+ case PROP_ITEM:
+ g_value_set_object (value, self->item);
+ break;
+
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
@@ -210,5 +215,8 @@ _ide_tweaks_factory_inflate (IdeTweaksFactory *self)
g_ptr_array_add (ar, _ide_tweaks_item_deep_copy (child));
}
+ if (g_set_object (&self->item, NULL))
+ g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_ITEM]);
+
return ar;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]