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
This commit is contained in:
parent
7d58972623
commit
8af63dc40a
2 changed files with 4 additions and 0 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue