Commit 61470a2a authored by Jeremy Bicha's avatar Jeremy Bicha 🎹

printers: Set mnemonic widget for labels

This allows screen readers to read the label for each widget.
parent 9f24a731
......@@ -37,6 +37,7 @@
<object class="GtkLabel">
<property name="label" translatable="yes">Name</property>
<property name="halign">end</property>
<property name="mnemonic_widget">printer_name_entry</property>
<style>
<class name="dim-label"/>
</style>
......@@ -62,6 +63,7 @@
<object class="GtkLabel">
<property name="label" translatable="yes">Location</property>
<property name="halign">end</property>
<property name="mnemonic_widget">printer_location_entry</property>
<style>
<class name="dim-label"/>
</style>
......@@ -86,6 +88,7 @@
<object class="GtkLabel">
<property name="label" translatable="yes">Address</property>
<property name="halign">end</property>
<property name="mnemonic_widget">printer_address_label</property>
<style>
<class name="dim-label"/>
</style>
......@@ -110,6 +113,7 @@
<object class="GtkLabel">
<property name="label" translatable="yes">Driver</property>
<property name="halign">end</property>
<property name="mnemonic_widget">printer_model_label</property>
<style>
<class name="dim-label"/>
</style>
......
......@@ -350,6 +350,7 @@ ipp_option_add (IPPAttribute *attr_supported,
position = grid_get_height (grid);
label = gtk_label_new (option_display_name);
gtk_label_set_mnemonic_widget (label, widget);
context = gtk_widget_get_style_context (label);
gtk_style_context_add_class (context, "dim-label");
gtk_widget_set_halign (label, GTK_ALIGN_END);
......@@ -382,6 +383,7 @@ ppd_option_add (ppd_option_t option,
position = grid_get_height (grid);
label = gtk_label_new (ppd_option_name_translate (&option));
gtk_label_set_mnemonic_widget (label, widget);
context = gtk_widget_get_style_context (label);
gtk_style_context_add_class (context, "dim-label");
gtk_widget_set_halign (label, GTK_ALIGN_END);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment