Re: [spice-gtk PATCH v2] spice-widget: keypress-delay set by env var

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

 



hi

----- Original Message -----
> ---
>  src/spice-widget.c | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/src/spice-widget.c b/src/spice-widget.c
> index 260fda5..30a6636 100644
> --- a/src/spice-widget.c
> +++ b/src/spice-widget.c
> @@ -364,7 +364,15 @@ static void spice_display_set_property(GObject
> *object,
>          scaling_updated(display);
>          break;
>      case PROP_KEYPRESS_DELAY:
> -        d->keypress_delay = g_value_get_uint(value);
> +        {
> +            const gchar *env = g_getenv("SPICE_KEYPRESS_DELAY");
> +            guint delay = g_value_get_uint(value);
> +            if (env != NULL)
> +                delay = (guint) g_ascii_strtoull(env, NULL, 10);
> +

strtoul is probably fine too (without cast?)

> +            SPICE_DEBUG("keypress-delay is set to %u ms", delay);
> +            d->keypress_delay = delay;
> +        }
>          break;
>      default:
>          G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
> --
> 2.4.3
> 

otherwise, looks good to me
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]