[gnome-control-center/gnome-3-8] common: Add separators to the language chooser list
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/gnome-3-8] common: Add separators to the language chooser list
- Date: Mon, 18 Mar 2013 09:59:46 +0000 (UTC)
commit 45b785aa005f4f9e180e1e54e0157803a7cb813f
Author: Rui Matos <tiagomatos gmail com>
Date: Wed Mar 6 21:25:11 2013 +0100
common: Add separators to the language chooser list
https://bugzilla.gnome.org/show_bug.cgi?id=695465
panels/common/cc-language-chooser.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/panels/common/cc-language-chooser.c b/panels/common/cc-language-chooser.c
index 8ba4c7b..3b7fed3 100644
--- a/panels/common/cc-language-chooser.c
+++ b/panels/common/cc-language-chooser.c
@@ -392,6 +392,22 @@ end_refilter (EggListBox *list_box,
}
static void
+update_separator_func (GtkWidget **separator,
+ GtkWidget *child,
+ GtkWidget *before,
+ gpointer user_data)
+{
+ if (before == NULL)
+ return;
+
+ if (*separator == NULL) {
+ *separator = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
+ g_object_ref_sink (*separator);
+ gtk_widget_show (*separator);
+ }
+}
+
+static void
cc_language_chooser_private_free (gpointer data)
{
CcLanguageChooserPrivate *priv = data;
@@ -441,6 +457,8 @@ cc_language_chooser_new (GtkWidget *parent)
language_visible, chooser, NULL);
egg_list_box_set_selection_mode (EGG_LIST_BOX (priv->language_list),
GTK_SELECTION_NONE);
+ egg_list_box_set_separator_funcs (EGG_LIST_BOX (priv->language_list),
+ update_separator_func, NULL, NULL);
add_all_languages (GTK_DIALOG (chooser));
g_signal_connect_swapped (priv->filter_entry, "changed",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]