mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-06 10:50:08 +00:00
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:
parent
455935a06a
commit
15ccdcd25b
@ -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 &&
|
||||
|
Loading…
Reference in New Issue
Block a user