[gnome-control-center] common: Disable language chooser confirm button until a language is selected
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] common: Disable language chooser confirm button until a language is selected
- Date: Mon, 27 Aug 2018 18:58:57 +0000 (UTC)
commit 8af63dc40a1a178857d0e7e45dfaf0e4a2ccebe8
Author: Robert Ancell <robert ancell canonical com>
Date: Wed Aug 22 11:54:44 2018 +1200
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
panels/common/cc-language-chooser.c | 3 +++
panels/common/cc-language-chooser.ui | 1 +
2 files changed, 4 insertions(+)
---
diff --git a/panels/common/cc-language-chooser.c b/panels/common/cc-language-chooser.c
index 6a188216c..445952a51 100644
--- a/panels/common/cc-language-chooser.c
+++ b/panels/common/cc-language-chooser.c
@@ -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"));
diff --git a/panels/common/cc-language-chooser.ui b/panels/common/cc-language-chooser.ui
index 2c351e9ba..b9e735419 100644
--- a/panels/common/cc-language-chooser.ui
+++ b/panels/common/cc-language-chooser.ui
@@ -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>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]