On Wed, Dec 12, 2012 at 10:03:35AM +0100, Olivier Fourdan wrote:
> 

> >From 67ff0a18b8807d4d254b8e074f0d3d83a8b64547 Mon Sep 17 00:00:00 2001
> From: Olivier Fourdan <ofour...@redhat.com>
> Date: Wed, 12 Dec 2012 09:55:07 +0100
> Subject: [PATCH] test: warn if a tablet has buttons but no layout
> 
> so we can quickly spot the layouts to contribute,
> but do not assert since layouts are not mandatory.
> 
> Signed-off-by: Olivier Fourdan <ofour...@redhat.com>

applied, thank you

Cheers,
   Peter

> ---
>  test/tablet-svg-validity.c |    8 ++++++--
>  1 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/test/tablet-svg-validity.c b/test/tablet-svg-validity.c
> index 296fa1a..d0bb54d 100644
> --- a/test/tablet-svg-validity.c
> +++ b/test/tablet-svg-validity.c
> @@ -245,8 +245,13 @@ verify_tablet_layout (WacomDeviceDatabase *db, 
> WacomDevice *device)
>               return;
>  
>       filename = libwacom_get_layout_filename(device);
> -     if (filename == NULL)
> +     num_buttons = libwacom_get_num_buttons (device);
> +
> +     if (filename == NULL) {
> +             if (num_buttons > 0)
> +                     g_warning ("device '%s' has buttons but no layout", 
> name);
>               return;
> +     }
>  
>       g_message ("Verifying device '%s', SVG file '%s'", name, filename);
>  
> @@ -269,7 +274,6 @@ verify_tablet_layout (WacomDeviceDatabase *db, 
> WacomDevice *device)
>       g_assert (prop != NULL);
>       xmlFree(prop);
>  
> -     num_buttons = libwacom_get_num_buttons (device);
>       for (button = 'A'; button < 'A' + num_buttons; button++) {
>               check_button (cur, device, button, "Button");
>               check_button (cur, device, button, "Label");
> -- 
> 1.7.1
> 

> ------------------------------------------------------------------------------
> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
> Remotely access PCs and mobile devices and provide instant support
> Improve your efficiency, and focus on delivering more value-add services
> Discover what IT Professionals Know. Rescue delivers
> http://p.sf.net/sfu/logmein_12329d2d

> _______________________________________________
> Linuxwacom-devel mailing list
> Linuxwacom-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to