networking: set mnemonic widget for labels and values in connection details
https://bugzilla.gnome.org/show_bug.cgi?id=719986
This commit is contained in:
parent
07c3546611
commit
b5d03b42a0
3 changed files with 17 additions and 12 deletions
|
@ -71,22 +71,25 @@ device_ethernet_add_to_notebook (NetObject *object,
|
|||
static void
|
||||
add_details_row (GtkWidget *details, gint top, const gchar *heading, const gchar *value)
|
||||
{
|
||||
GtkWidget *label;
|
||||
GtkWidget *heading_label;
|
||||
GtkWidget *value_label;
|
||||
|
||||
label = gtk_label_new (heading);
|
||||
gtk_style_context_add_class (gtk_widget_get_style_context (label), "dim-label");
|
||||
gtk_widget_set_halign (label, GTK_ALIGN_END);
|
||||
gtk_widget_set_hexpand (label, TRUE);
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 1, 0.5);
|
||||
heading_label = gtk_label_new (heading);
|
||||
gtk_style_context_add_class (gtk_widget_get_style_context (heading_label), "dim-label");
|
||||
gtk_widget_set_halign (heading_label, GTK_ALIGN_END);
|
||||
gtk_widget_set_hexpand (heading_label, TRUE);
|
||||
gtk_misc_set_alignment (GTK_MISC (heading_label), 1, 0.5);
|
||||
|
||||
gtk_grid_attach (GTK_GRID (details), label, 0, top, 1, 1);
|
||||
gtk_grid_attach (GTK_GRID (details), heading_label, 0, top, 1, 1);
|
||||
|
||||
label = gtk_label_new (value);
|
||||
gtk_widget_set_halign (label, GTK_ALIGN_START);
|
||||
gtk_widget_set_hexpand (label, TRUE);
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
|
||||
value_label = gtk_label_new (value);
|
||||
gtk_widget_set_halign (value_label, GTK_ALIGN_START);
|
||||
gtk_widget_set_hexpand (value_label, TRUE);
|
||||
gtk_misc_set_alignment (GTK_MISC (value_label), 0, 0.5);
|
||||
|
||||
gtk_grid_attach (GTK_GRID (details), label, 1, top, 1, 1);
|
||||
gtk_label_set_mnemonic_widget(heading_label, value_label);
|
||||
|
||||
gtk_grid_attach (GTK_GRID (details), value_label, 1, top, 1, 1);
|
||||
}
|
||||
|
||||
static gchar *
|
||||
|
|
|
@ -296,6 +296,7 @@ net_device_simple_add_row (NetDeviceSimple *device_simple,
|
|||
value = gtk_label_new (NULL);
|
||||
gtk_misc_set_alignment (GTK_MISC (value), 0.0, 0.5);
|
||||
g_object_bind_property (device_simple, property_name, value, "label", 0);
|
||||
gtk_label_set_mnemonic_widget(label, value);
|
||||
gtk_grid_attach (grid, value, 1, top_attach, 1, 1);
|
||||
gtk_widget_show (value);
|
||||
}
|
||||
|
|
|
@ -468,6 +468,7 @@ net_virtual_device_add_row (NetVirtualDevice *virtual_device,
|
|||
value = gtk_label_new (NULL);
|
||||
gtk_misc_set_alignment (GTK_MISC (value), 0.0, 0.5);
|
||||
g_object_bind_property (virtual_device, property_name, value, "label", 0);
|
||||
gtk_label_set_mnemonic_widget(label, value);
|
||||
gtk_grid_attach (grid, value, 1, top_attach, 1, 1);
|
||||
gtk_widget_show (value);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue