Re: [PATCH] Set device type during construction



On Wed, 2009-07-08 at 12:55 +0100, Daniel Drake wrote:
> With the recent removal of nm_device_set_device_type(), the DeviceType
> property is never set.

Yeah, had that locally last night but didn't push it:

be9bc944d4345e4703b05b5f8e17ecde07134b6b

Dan

> ---
>  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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]