[gnome-initial-setup] language: Arrange filter func a bit



commit e3dbad9cf545226e37cac342d5574d31787227a2
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed Jan 2 11:58:01 2013 -0500

    language: Arrange filter func a bit
    
    Use less goto.

 .../pages/language/gis-language-page.c             |   14 +++-----------
 1 files changed, 3 insertions(+), 11 deletions(-)
---
diff --git a/gnome-initial-setup/pages/language/gis-language-page.c b/gnome-initial-setup/pages/language/gis-language-page.c
index 8f6a3e2..68d4671 100644
--- a/gnome-initial-setup/pages/language/gis-language-page.c
+++ b/gnome-initial-setup/pages/language/gis-language-page.c
@@ -189,7 +189,6 @@ language_visible (GtkWidget *child,
   GisLanguagePagePrivate *priv = page->priv;
   gchar *locale_name;
   const gchar *filter_contents;
-  gboolean visible = TRUE;
   gboolean is_extra;
 
   is_extra = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (child), "is-extra"));
@@ -197,19 +196,12 @@ language_visible (GtkWidget *child,
 
   filter_contents = gtk_entry_get_text (GTK_ENTRY (priv->filter_entry));
   if (*filter_contents && strcasestr (locale_name, filter_contents) == NULL)
-    {
-      visible = FALSE;
-      goto out;
-    }
+    return FALSE;
 
   if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->show_all)) && !is_extra)
-    {
-      visible = FALSE;
-      goto out;
-    }
+    return FALSE;
 
- out:
-  return visible;
+  return TRUE;
 }
 
 static void



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