diff options
Diffstat (limited to 'arch/linux/common/inputdevices.h')
-rw-r--r-- | arch/linux/common/inputdevices.h | 40 |
1 files changed, 27 insertions, 13 deletions
diff --git a/arch/linux/common/inputdevices.h b/arch/linux/common/inputdevices.h index 44a109ca..1a5baff8 100644 --- a/arch/linux/common/inputdevices.h +++ b/arch/linux/common/inputdevices.h @@ -22,8 +22,6 @@ static gboolean remove_input_devices(gpointer key, gpointer value, gpointer data) { if (!strncmp((gchar *) key, "INP", 3)) { - g_free((gchar *) key); - g_free((GtkTreeIter *) value); return TRUE; } @@ -42,7 +40,7 @@ static struct { }; void -scan_inputdevices(void) +__scan_input_devices(void) { FILE *dev; gchar buffer[128]; @@ -55,7 +53,7 @@ scan_inputdevices(void) return; if (input_list) { - g_hash_table_foreach_remove(devices, remove_input_devices, NULL); + g_hash_table_foreach_remove(moreinfo, remove_input_devices, NULL); g_free(input_list); g_free(input_icons); } @@ -103,15 +101,31 @@ scan_inputdevices(void) gchar *strhash = g_strdup_printf("[Device Information]\n" "Name=%s\n" "Type=%s\n" - "Bus=0x%x\n" - "Vendor=0x%x\n" - "Product=0x%x\n" - "Version=0x%x\n" - "Connected to=%s\n", - name, input_devices[d].name, - bus, vendor, product, - version, phys); - g_hash_table_insert(devices, tmp, strhash); + "Bus=0x%x\n", + name, + input_devices[d].name, + bus); + + const gchar *url = vendor_get_url(name); + if (url) { + strhash = g_strdup_printf("%s" + "Vendor=%s (%s)\n", + strhash, + vendor_get_name(name), + url); + } else { + strhash = g_strdup_printf("%s" + "Vendor=%x\n", + strhash, + vendor); + } + + strhash = g_strdup_printf("%s" + "Product=0x%x\n" + "Version=0x%x\n" + "Connected to=%s\n", + strhash, product, version, phys); + g_hash_table_insert(moreinfo, tmp, strhash); g_free(phys); g_free(name); |