diff options
author | Xavier Claessens <xclaesse@src.gnome.org> | 2008-11-22 00:25:15 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2008-11-22 00:25:15 +0800 |
commit | ee790499da343a196a05f78ae80d441bd3eff7fd (patch) | |
tree | 7641630eca5e895a594876cf21090b07ee9ea837 /src | |
parent | 6bc969461080973c6878f0eb1973fd626f8a9663 (diff) | |
download | gsoc2013-empathy-ee790499da343a196a05f78ae80d441bd3eff7fd.tar gsoc2013-empathy-ee790499da343a196a05f78ae80d441bd3eff7fd.tar.gz gsoc2013-empathy-ee790499da343a196a05f78ae80d441bd3eff7fd.tar.bz2 gsoc2013-empathy-ee790499da343a196a05f78ae80d441bd3eff7fd.tar.lz gsoc2013-empathy-ee790499da343a196a05f78ae80d441bd3eff7fd.tar.xz gsoc2013-empathy-ee790499da343a196a05f78ae80d441bd3eff7fd.tar.zst gsoc2013-empathy-ee790499da343a196a05f78ae80d441bd3eff7fd.zip |
If first_line xor second_line is NULL, use only one line in ft_manager_update_ft_row.
svn path=/trunk/; revision=1914
Diffstat (limited to 'src')
-rw-r--r-- | src/empathy-ft-manager.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/empathy-ft-manager.c b/src/empathy-ft-manager.c index fa1eacd75..fb1473a59 100644 --- a/src/empathy-ft-manager.c +++ b/src/empathy-ft-manager.c @@ -182,7 +182,8 @@ ft_manager_update_ft_row (EmpathyFTManager *ft_manager, GtkTreeIter iter; const gchar *filename; const gchar *contact_name; - gchar *msg = NULL; + const gchar *msg; + gchar *msg_dup = NULL; gchar *remaining_str = NULL; gchar *first_line_format; gchar *first_line = NULL; @@ -309,7 +310,9 @@ ft_manager_update_ft_row (EmpathyFTManager *ft_manager, remaining_str = ft_manager_format_interval (remaining); if (first_line != NULL && second_line != NULL) - msg = g_strdup_printf ("%s\n%s", first_line, second_line); + msg = msg_dup = g_strdup_printf ("%s\n%s", first_line, second_line); + else + msg = first_line ? first_line : second_line; /* Set new values in the store */ path = gtk_tree_row_reference_get_path (row_ref); @@ -323,7 +326,7 @@ ft_manager_update_ft_row (EmpathyFTManager *ft_manager, gtk_tree_path_free (path); - g_free (msg); + g_free (msg_dup); g_free (first_line); g_free (second_line); g_free (remaining_str); |