]> git.0d.be Git - empathy.git/commitdiff
Show/Hide the live search before refiltering
authorXavier Claessens <xclaesse@gmail.com>
Tue, 8 Jun 2010 21:47:27 +0000 (23:47 +0200)
committerXavier Claessens <xclaesse@gmail.com>
Wed, 9 Jun 2010 11:23:15 +0000 (13:23 +0200)
libempathy-gtk/empathy-live-search.c

index cf80f9aa59733f11a38c9b8c61841e1c2f3c156d..b1215bfd379be4f134a2e67c54c6391fa5fa0f47 100644 (file)
@@ -141,14 +141,14 @@ live_search_text_changed (GtkEntry *entry,
 
   text = gtk_entry_get_text (entry);
 
-  g_free (priv->text_stripped);
-  priv->text_stripped = strip_utf8_string (text);
-  g_object_notify (G_OBJECT (self), "text");
-
-  if (g_utf8_strlen (text, -1) < 1)
+  if (EMP_STR_EMPTY (text))
     gtk_widget_hide (GTK_WIDGET (self));
   else
     gtk_widget_show (GTK_WIDGET (self));
+
+  g_free (priv->text_stripped);
+  priv->text_stripped = strip_utf8_string (text);
+  g_object_notify (G_OBJECT (self), "text");
 }
 
 static void