summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2012-01-25 13:38:46 +0000
committerBastien Nocera <hadess@hadess.net>2012-01-25 13:41:49 +0000
commitd12bb056096c2a31bc92834d8a714ecf485dbeed (patch)
treeb527154640e0c5685d01897d6a9b8368aabf3ca8
parent681ac4ef021640c2e64d5f038f2a5721eac02004 (diff)
all: Remove separate Vendor/Product strings
As those were unused, and hampered our ability to use the kernel as a source for the device names.
-rw-r--r--data/cintiq-21ux.tablet3
-rw-r--r--data/cintiq-21ux2.tablet3
-rw-r--r--data/generic.tablet3
-rw-r--r--data/graphire4-4x5.tablet3
-rw-r--r--data/intuos4-6x9-wl.tablet3
-rw-r--r--data/intuos4-6x9.tablet3
-rw-r--r--data/serial-wacf004.tablet3
-rw-r--r--data/wacom.example7
-rw-r--r--data/wireless-pen-tablet.tablet3
-rw-r--r--libwacom/libwacom-database.c3
-rw-r--r--libwacom/libwacom.c17
-rw-r--r--libwacom/libwacom.h10
-rw-r--r--libwacom/libwacomint.h3
-rw-r--r--test/load.c4
14 files changed, 21 insertions, 47 deletions
diff --git a/data/cintiq-21ux.tablet b/data/cintiq-21ux.tablet
index 724fa19..f3ffda1 100644
--- a/data/cintiq-21ux.tablet
+++ b/data/cintiq-21ux.tablet
@@ -1,6 +1,5 @@
[Device]
-Product=Cintiq 21UX
-Vendor=Wacom
+Name=Wacom Cintiq 21UX
DeviceMatch=usb:056a:003f
Class=Cintiq
Width=17
diff --git a/data/cintiq-21ux2.tablet b/data/cintiq-21ux2.tablet
index 4593597..2b83264 100644
--- a/data/cintiq-21ux2.tablet
+++ b/data/cintiq-21ux2.tablet
@@ -1,6 +1,5 @@
[Device]
-Product=Cintiq 21UX2
-Vendor=Wacom
+Name=Wacom Cintiq 21UX2
DeviceMatch=usb:0xdeadbeef:0xdeadbeef
[Features]
diff --git a/data/generic.tablet b/data/generic.tablet
index 3a52722..a8e13b0 100644
--- a/data/generic.tablet
+++ b/data/generic.tablet
@@ -1,6 +1,5 @@
[Device]
-Product=Generic
-Vendor=Wacom
+Name=Generic
DeviceMatch=generic
[Features]
diff --git a/data/graphire4-4x5.tablet b/data/graphire4-4x5.tablet
index 728e483..1270694 100644
--- a/data/graphire4-4x5.tablet
+++ b/data/graphire4-4x5.tablet
@@ -1,6 +1,5 @@
[Device]
-Product=Graphire4 4x5
-Vendor=Wacom
+Name=Wacom Graphire4 4x5
DeviceMatch=usb:056a:0015
Class=Graphire
Model=Graphire4
diff --git a/data/intuos4-6x9-wl.tablet b/data/intuos4-6x9-wl.tablet
index 63aae0a..5fb2bbe 100644
--- a/data/intuos4-6x9-wl.tablet
+++ b/data/intuos4-6x9-wl.tablet
@@ -1,6 +1,5 @@
[Device]
-Product=Intuos 4 WL 6x9
-Vendor=Wacom
+Name=Wacom Intuos 4 WL 6x9
# FIXME add missing bluetooth match
DeviceMatch=usb:056a:00bc
Class=Intuos4
diff --git a/data/intuos4-6x9.tablet b/data/intuos4-6x9.tablet
index 4a1c4c8..e4884ad 100644
--- a/data/intuos4-6x9.tablet
+++ b/data/intuos4-6x9.tablet
@@ -1,6 +1,5 @@
[Device]
-Product=Intuos 4 M 6x9
-Vendor=Wacom
+Name=Wacom Intuos 4 M 6x9
DeviceMatch=usb:056a:00b9
Class=Intuos4
Width=9
diff --git a/data/serial-wacf004.tablet b/data/serial-wacf004.tablet
index a64d811..758afba 100644
--- a/data/serial-wacf004.tablet
+++ b/data/serial-wacf004.tablet
@@ -1,6 +1,5 @@
[Device]
-Product=Serial Tablet WACf004
-Vendor=Wacom
+Name=Wacom Serial Tablet WACf004
DeviceMatch=serial:0:0
[Features]
diff --git a/data/wacom.example b/data/wacom.example
index e87ac8a..f9ba20d 100644
--- a/data/wacom.example
+++ b/data/wacom.example
@@ -1,11 +1,8 @@
# Example model file description for a tablet
[Device]
-# The product is the product name announced by the kernel
-Product=Intuos 4 WL 6x9
-
-# Vendor name of this tablet
-Vendor=Wacom
+# The name is the vendor and product name announced by the kernel
+Name=Wacom Intuos4 6x9
# DeviceMatch includes the bus (usb, serial), the vendor ID and the actual
# product ID
diff --git a/data/wireless-pen-tablet.tablet b/data/wireless-pen-tablet.tablet
index 6a5db93..5b32d98 100644
--- a/data/wireless-pen-tablet.tablet
+++ b/data/wireless-pen-tablet.tablet
@@ -1,6 +1,5 @@
[Device]
-Product=Graphire Wireless
-Vendor=Wacom
+Name=Wacom Graphire Wireless
DeviceMatch=bluetooth:056a:81
Class=Graphire
Width=8
diff --git a/libwacom/libwacom-database.c b/libwacom/libwacom-database.c
index c7fdcc2..0aa2147 100644
--- a/libwacom/libwacom-database.c
+++ b/libwacom/libwacom-database.c
@@ -221,8 +221,7 @@ libwacom_parse_tablet_keyfile(const char *path)
g_free (match);
}
- device->vendor = g_key_file_get_string(keyfile, DEVICE_GROUP, "Vendor", NULL);
- device->product = g_key_file_get_string(keyfile, DEVICE_GROUP, "Product", NULL);
+ device->name = g_key_file_get_string(keyfile, DEVICE_GROUP, "Name", NULL);
device->width = g_key_file_get_integer(keyfile, DEVICE_GROUP, "Width", NULL);
device->height = g_key_file_get_integer(keyfile, DEVICE_GROUP, "Height", NULL);
diff --git a/libwacom/libwacom.c b/libwacom/libwacom.c
index f1f659f..7a2a9f3 100644
--- a/libwacom/libwacom.c
+++ b/libwacom/libwacom.c
@@ -150,8 +150,7 @@ libwacom_copy(const WacomDevice *device)
WacomDevice *d;
d = g_new0 (WacomDevice, 1);
- d->vendor = g_strdup (device->vendor);
- d->product = g_strdup (device->product);
+ d->name = g_strdup (device->name);
d->width = device->width;
d->height = device->height;
d->match = g_strdup (device->match);
@@ -253,7 +252,7 @@ libwacom_new_from_name(WacomDeviceDatabase *db, const char *name, WacomError *er
for (l = keys; l; l = l->next) {
WacomDevice *d = l->data;
- if (g_strcmp0 (d->product, name) == 0) {
+ if (g_strcmp0 (d->name, name) == 0) {
device = d;
break;
}
@@ -270,27 +269,21 @@ libwacom_new_from_name(WacomDeviceDatabase *db, const char *name, WacomError *er
void
libwacom_destroy(WacomDevice *device)
{
- g_free (device->vendor);
- g_free (device->product);
+ g_free (device->name);
g_free (device->match);
g_free (device->supported_styli);
g_free (device);
}
-const char* libwacom_get_vendor(WacomDevice *device)
-{
- return device->vendor;
-}
-
int libwacom_get_vendor_id(WacomDevice *device)
{
return device->vendor_id;
}
-const char* libwacom_get_product(WacomDevice *device)
+const char* libwacom_get_name(WacomDevice *device)
{
- return device->product;
+ return device->name;
}
int libwacom_get_product_id(WacomDevice *device)
diff --git a/libwacom/libwacom.h b/libwacom/libwacom.h
index 0ab9034..bda4e59 100644
--- a/libwacom/libwacom.h
+++ b/libwacom/libwacom.h
@@ -237,9 +237,9 @@ WacomClass libwacom_get_class(WacomDevice *device);
/**
* @param device The tablet to query
- * @return The human-readable vendor for this device
+ * @return The human-readable name for this device
*/
-const char* libwacom_get_vendor(WacomDevice *device);
+const char* libwacom_get_name(WacomDevice *device);
/**
* @param device The tablet to query
@@ -249,12 +249,6 @@ int libwacom_get_vendor_id(WacomDevice *device);
/**
* @param device The tablet to query
- * @return The human-readable product for this device
- */
-const char* libwacom_get_product(WacomDevice *device);
-
-/**
- * @param device The tablet to query
* @return The first match for the device in question
*/
const char* libwacom_get_match(WacomDevice *device);
diff --git a/libwacom/libwacomint.h b/libwacom/libwacomint.h
index b93e368..ce01f51 100644
--- a/libwacom/libwacomint.h
+++ b/libwacom/libwacomint.h
@@ -59,8 +59,7 @@ enum WacomFeature {
};
struct _WacomDevice {
- char *vendor;
- char *product;
+ char *name;
int width;
int height;
diff --git a/test/load.c b/test/load.c
index dc9069d..61431f0 100644
--- a/test/load.c
+++ b/test/load.c
@@ -48,8 +48,8 @@ int main(int argc, char **argv)
device = libwacom_new_from_usbid(db, 0x56a, 0x00bc, NULL);
assert(device);
- str = libwacom_get_vendor(device);
- assert(strcmp(str, "Wacom") == 0);
+ str = libwacom_get_name(device);
+ assert(strcmp(str, "Wacom Intuos 4 WL 6x9") == 0);
assert(libwacom_get_class(device) == WCLASS_INTUOS4);
assert(libwacom_get_vendor_id(device) == 0x56a);
assert(libwacom_get_product_id(device) == 0xbc);