inspector: Don't show numeric ids

The vendor and product ids for input devices aren't useful
as-is; need to figure out how to translate them to names.
This commit is contained in:
Matthias Clasen 2016-02-25 01:10:23 -05:00
parent 455935a06a
commit 15ccdcd25b

View File

@ -412,64 +412,6 @@ add_device (GtkInspectorGeneral *gen,
gtk_list_box_insert (GTK_LIST_BOX (gen->priv->device_box), row, -1);
if (gdk_device_get_vendor_id (device))
{
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 40);
g_object_set (box,
"margin", 10,
"margin-start", 30,
NULL);
label = gtk_label_new ("Vendor");
gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE);
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0);
label = gtk_label_new (gdk_device_get_vendor_id (device));
gtk_label_set_selectable (GTK_LABEL (label), TRUE);
gtk_widget_set_halign (label, GTK_ALIGN_END);
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE);
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0);
row = gtk_list_box_row_new ();
gtk_container_add (GTK_CONTAINER (row), box);
gtk_list_box_row_set_activatable (GTK_LIST_BOX_ROW (row), FALSE);
gtk_widget_show_all (row);
gtk_list_box_insert (GTK_LIST_BOX (gen->priv->device_box), row, -1);
}
if (gdk_device_get_product_id (device))
{
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 40);
g_object_set (box,
"margin", 10,
"margin-start", 30,
NULL);
label = gtk_label_new ("Product");
gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE);
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0);
label = gtk_label_new (gdk_device_get_product_id (device));
gtk_label_set_selectable (GTK_LABEL (label), TRUE);
gtk_widget_set_halign (label, GTK_ALIGN_END);
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE);
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0);
row = gtk_list_box_row_new ();
gtk_container_add (GTK_CONTAINER (row), box);
gtk_list_box_row_set_activatable (GTK_LIST_BOX_ROW (row), FALSE);
gtk_widget_show_all (row);
gtk_list_box_insert (GTK_LIST_BOX (gen->priv->device_box), row, -1);
}
str = g_string_new ("");
if (gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD &&