Commit 8af63dc4 authored by Robert Ancell's avatar Robert Ancell Committed by Georges Basile Stavracas Neto

common: Disable language chooser confirm button until a language is selected

Make the button insenstive until a language is chosen as per:
https://wiki.gnome.org/Design/SystemSettings/RegionAndLanguage
parent 7d589726
Pipeline #27044 passed with stages
in 24 minutes and 41 seconds
......@@ -295,6 +295,8 @@ set_locale_id (CcLanguageChooser *chooser,
g_autoptr(GList) children = NULL;
GList *l;
gtk_widget_set_sensitive (chooser->done_button, FALSE);
children = gtk_container_get_children (GTK_CONTAINER (chooser->language_listbox));
for (l = children; l; l = l->next) {
GtkWidget *row = l->data;
......@@ -307,6 +309,7 @@ set_locale_id (CcLanguageChooser *chooser,
gboolean is_extra;
gtk_widget_set_opacity (check, 1.0);
gtk_widget_set_sensitive (chooser->done_button, TRUE);
/* make sure the selected language is shown */
is_extra = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (row), "is-extra"));
......
......@@ -10,6 +10,7 @@
<object class="GtkButton" id="done_button">
<property name="label" translatable="yes">_Done</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">True</property>
......
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