This makes the dialog easier to use via keyboard navigation since
otherwise we would just dismiss the dialog with the current selection
on enter when the user actually intended to change the selection.
https://bugzilla.gnome.org/show_bug.cgi?id=752001
When iterating locales in the format chooser,
gnome_get_country_from_locale() is called for each of them to build the
locale label for the list row.
The function creating the label doesn't take into account that
gnome_get_country_from_locale() can return NULL, in which case it will
both:
- display an empty row in the list
- crash when later trying to find a word in a NULL string with strstr()
inside match_all()
Just avoid creating a widget in that case.
https://bugzilla.gnome.org/show_bug.cgi?id=742639
In order to prevent the labels from moving around when hiding and
showing the check mark we need to keep the check mark always visible
and instead tweak its opacity.
We also add an always transparent widget the same size as the check
mark on the other side of the label to make sure that the label is
globally centered.
https://bugzilla.gnome.org/show_bug.cgi?id=695536
We normalize both the filter string from the user and the region label
to disregard case and accents. Then we try to match the region label
on its native translation, the current LC_MESSAGES translation and
untranslated.