[gnome-initial-setup] language: Move the visibility of extra items to a separate variable



commit 858ccf44915c503c7dbe165a83f8b55b883e9d96
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed Jan 2 12:00:06 2013 -0500

    language: Move the visibility of extra items to a separate variable
    
    Soon enough we'll remove the checkbox and replace it with an inline
    "More" item.

 .../pages/language/gis-language-page.c             |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gnome-initial-setup/pages/language/gis-language-page.c b/gnome-initial-setup/pages/language/gis-language-page.c
index 68d4671..e3cdcd6 100644
--- a/gnome-initial-setup/pages/language/gis-language-page.c
+++ b/gnome-initial-setup/pages/language/gis-language-page.c
@@ -61,6 +61,7 @@ struct _GisLanguagePagePrivate
   GtkWidget *filter_entry;
   GtkWidget *language_list;
   gboolean adding_languages;
+  gboolean showing_extra;
 };
 
 #define OBJ(type,name) ((type)gtk_builder_get_object(GIS_PAGE (page)->builder,(name)))
@@ -198,7 +199,7 @@ language_visible (GtkWidget *child,
   if (*filter_contents && strcasestr (locale_name, filter_contents) == NULL)
     return FALSE;
 
-  if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->show_all)) && !is_extra)
+  if (!page->priv->showing_extra && !is_extra)
     return FALSE;
 
   return TRUE;
@@ -230,6 +231,8 @@ show_all_toggled (GtkCheckButton  *button,
   gtk_widget_hide (GTK_WIDGET (button));
   gtk_widget_show (priv->filter_entry);
 
+  page->priv->showing_extra = TRUE;
+
   egg_list_box_refilter (EGG_LIST_BOX (priv->language_list));
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]