# HG changeset patch # User zas_ # Date 1210278063 0 # Node ID 408f36d536a5ffb918518b830f36c91167d131e5 # Parent 651ae2be103178b782e0497b4e0f637051d45b23 search_status_update(): slightly reduce code redundancy. diff -r 651ae2be1031 -r 408f36d536a5 src/search.c --- a/src/search.c Thu May 08 12:50:25 2008 +0000 +++ b/src/search.c Thu May 08 20:21:03 2008 +0000 @@ -266,26 +266,25 @@ gint64 t_bytes; gint64 s_bytes; gchar *tt; - gchar *ts; t = search_result_count(sd, &t_bytes); s = search_result_selection_count(sd, &s_bytes); + + tt = text_from_size_abrev(t_bytes); if (s > 0) { - tt = text_from_size_abrev(t_bytes); - ts = text_from_size_abrev(s_bytes); + gchar *ts = text_from_size_abrev(s_bytes); buf = g_strdup_printf(_("%s, %d files (%s, %d)"), tt, t, ts, s); - g_free(tt); g_free(ts); } else { - tt = text_from_size_abrev(t_bytes); buf = g_strdup_printf(_("%s, %d files"), tt, t); - g_free(tt); } + g_free(tt); + gtk_label_set_text(GTK_LABEL(sd->label_status), buf); g_free(buf); }