From fd6f48ec357f8f2d88a33fcf2891f01be65a1d81 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Fri, 9 Jun 2023 10:13:12 +0200 Subject: [PATCH] device: generic: make type-description property read-only The property is not written anywhere, make it read-only. --- src/core/devices/nm-device-generic.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/src/core/devices/nm-device-generic.c b/src/core/devices/nm-device-generic.c index c62c7ba11..f3ac16e8b 100644 --- a/src/core/devices/nm-device-generic.c +++ b/src/core/devices/nm-device-generic.c @@ -128,22 +128,6 @@ get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) } } -static void -set_property(GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) -{ - NMDeviceGeneric *self = NM_DEVICE_GENERIC(object); - NMDeviceGenericPrivate *priv = NM_DEVICE_GENERIC_GET_PRIVATE(self); - - switch (prop_id) { - case PROP_TYPE_DESCRIPTION: - priv->type_description = g_value_dup_string(value); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); - break; - } -} - /*****************************************************************************/ static void @@ -212,7 +196,6 @@ nm_device_generic_class_init(NMDeviceGenericClass *klass) object_class->constructor = constructor; object_class->dispose = dispose; object_class->get_property = get_property; - object_class->set_property = set_property; dbus_object_class->interface_infos = NM_DBUS_INTERFACE_INFOS(&interface_info_device_generic); @@ -231,7 +214,7 @@ nm_device_generic_class_init(NMDeviceGenericClass *klass) "", "", NULL, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS); + G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); g_object_class_install_properties(object_class, _PROPERTY_ENUMS_LAST, obj_properties); }