diff options
author | Chris Maynard <Christopher.Maynard@GTECH.COM> | 2010-11-17 03:29:12 +0000 |
---|---|---|
committer | Chris Maynard <Christopher.Maynard@GTECH.COM> | 2010-11-17 03:29:12 +0000 |
commit | 1e2ae5a88a0100ec87d613f8a0d1f94ea3eda703 (patch) | |
tree | 364188d3a603dafea951d4297e0921b0956807d5 /gtk/rtp_stream_dlg.c | |
parent | 9aeb1dac1770c29b74b0278eda284701a2e8f731 (diff) |
Quote all fields when exporting to CSV. Fixes bug 2811.
svn path=/trunk/; revision=34920
Diffstat (limited to 'gtk/rtp_stream_dlg.c')
-rw-r--r-- | gtk/rtp_stream_dlg.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/rtp_stream_dlg.c b/gtk/rtp_stream_dlg.c index 91138098b7..26184c9243 100644 --- a/gtk/rtp_stream_dlg.c +++ b/gtk/rtp_stream_dlg.c @@ -465,7 +465,7 @@ rtpstream_on_copy_as_csv(GtkWindow *win _U_, gpointer data _U_) for (j=0; j<NUM_COLS-1; j++) { column = gtk_tree_view_get_column(GTK_TREE_VIEW(list), j); title = gtk_tree_view_column_get_title(column); - g_string_append(CSV_str, title); + g_string_append_printf(CSV_str, "\"%s\"", title); if (j<NUM_COLS-2) g_string_append(CSV_str, ","); } g_string_append(CSV_str,"\n"); @@ -475,7 +475,7 @@ rtpstream_on_copy_as_csv(GtkWindow *win _U_, gpointer data _U_) for (i=0; i<streams_nb; i++) { for (j=0; j<NUM_COLS-1; j++) { gtk_tree_model_get(GTK_TREE_MODEL(list_store), &iter, j, &table_entry, -1); - g_string_append(CSV_str,table_entry); + g_string_append_printf(CSV_str, "\"%s\"", table_entry); if (j<NUM_COLS-2) g_string_append(CSV_str,","); } g_string_append(CSV_str,"\n"); |