[PATCH] Set device type during construction
- From: Daniel Drake <dsd laptop org>
- To: dcbw redhat com
- Cc: networkmanager-list gnome org
- Subject: [PATCH] Set device type during construction
- Date: Wed, 8 Jul 2009 12:55:53 +0100 (BST)
With the recent removal of nm_device_set_device_type(), the DeviceType
property is never set.
---
src/nm-device-interface.c | 2 +-
src/nm-device.c | 4 ++++
2 files changed, 5 insertions(+), 1 deletions(-)
For master only
diff --git a/src/nm-device-interface.c b/src/nm-device-interface.c
index 8464683..5647adb 100644
--- a/src/nm-device-interface.c
+++ b/src/nm-device-interface.c
@@ -137,7 +137,7 @@ nm_device_interface_init (gpointer g_iface)
"DeviceType",
"DeviceType",
0, G_MAXUINT32, NM_DEVICE_TYPE_UNKNOWN,
- G_PARAM_READABLE));
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
g_object_interface_install_property
(g_iface, g_param_spec_boolean (NM_DEVICE_INTERFACE_MANAGED,
diff --git a/src/nm-device.c b/src/nm-device.c
index b34795e..55a8fed 100644
--- a/src/nm-device.c
+++ b/src/nm-device.c
@@ -2232,6 +2232,10 @@ set_property (GObject *object, guint prop_id,
/* construct-only */
priv->udi = g_strdup (g_value_get_string (value));
break;
+ case NM_DEVICE_INTERFACE_PROP_DEVICE_TYPE:
+ /* construct-only */
+ priv->type = g_value_get_uint (value);
+ break;
case NM_DEVICE_INTERFACE_PROP_IFACE:
g_free (priv->iface);
priv->iface = g_value_dup_string (value);
--
1.6.2.5
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]