[gnome-initial-setup] language: Add a property for showing-extra
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup] language: Add a property for showing-extra
- Date: Fri, 15 Mar 2013 22:34:15 +0000 (UTC)
commit 91ea404c4127dfba1b1d99729bddf367f0cd2e4a
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Fri Mar 15 18:25:13 2013 -0400
language: Add a property for showing-extra
The control center will use this to determine whether it should
make its dialog resizable.
.../pages/language/gis-language-chooser.c | 17 ++++++++++++++++-
.../pages/language/gis-language-chooser.h | 1 +
2 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/gnome-initial-setup/pages/language/gis-language-chooser.c
b/gnome-initial-setup/pages/language/gis-language-chooser.c
index ac41b6f..4d2aa2b 100644
--- a/gnome-initial-setup/pages/language/gis-language-chooser.c
+++ b/gnome-initial-setup/pages/language/gis-language-chooser.c
@@ -48,6 +48,7 @@ G_DEFINE_TYPE (GisLanguageChooser, gis_language_chooser, GTK_TYPE_BIN);
enum {
PROP_0,
PROP_LANGUAGE,
+ PROP_SHOWING_EXTRA,
PROP_LAST,
};
@@ -338,8 +339,8 @@ show_more (GisLanguageChooser *chooser)
gtk_widget_grab_focus (priv->filter_entry);
priv->showing_extra = TRUE;
-
egg_list_box_refilter (EGG_LIST_BOX (priv->language_list));
+ g_object_notify_by_pspec (G_OBJECT (chooser), obj_props[PROP_SHOWING_EXTRA]);
}
static void
@@ -498,6 +499,9 @@ gis_language_chooser_get_property (GObject *object,
case PROP_LANGUAGE:
g_value_set_string (value, gis_language_chooser_get_language (chooser));
break;
+ case PROP_SHOWING_EXTRA:
+ g_value_set_boolean (value, gis_language_chooser_get_showing_extra (chooser));
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -547,6 +551,10 @@ gis_language_chooser_class_init (GisLanguageChooserClass *klass)
g_param_spec_string ("language", "", "", "",
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
+ obj_props[PROP_SHOWING_EXTRA] =
+ g_param_spec_string ("showing-extra", "", "", "",
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
+
g_object_class_install_properties (object_class, PROP_LAST, obj_props);
}
@@ -576,3 +584,10 @@ gis_language_chooser_set_language (GisLanguageChooser *chooser,
{
set_locale_id (chooser, language);
}
+
+gboolean
+gis_language_chooser_get_showing_extra (GisLanguageChooser *chooser)
+{
+ GisLanguageChooserPrivate *priv = chooser->priv;
+ return priv->showing_extra;
+}
diff --git a/gnome-initial-setup/pages/language/gis-language-chooser.h
b/gnome-initial-setup/pages/language/gis-language-chooser.h
index bfece3a..c54e9bf 100644
--- a/gnome-initial-setup/pages/language/gis-language-chooser.h
+++ b/gnome-initial-setup/pages/language/gis-language-chooser.h
@@ -59,6 +59,7 @@ void gis_language_chooser_clear_filter (GisLanguageChooser *chooser);
const gchar * gis_language_chooser_get_language (GisLanguageChooser *chooser);
void gis_language_chooser_set_language (GisLanguageChooser *chooser,
const gchar *language);
+gboolean gis_language_chooser_get_showing_extra (GisLanguageChooser *chooser);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]