aboutsummaryrefslogtreecommitdiffstats
path: root/ui/gtk
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2016-06-05 00:05:23 -0400
committerAnders Broman <a.broman58@gmail.com>2016-06-05 10:02:06 +0000
commit887b2030836167f92cf72a9cf7b1694d5a783624 (patch)
treef5c0f0b4ca92109e6f90ff6256b7f699c9caf9a2 /ui/gtk
parent6a847b7e015bc2f97e5a8ef5735f02c1981c7dc7 (diff)
Don't copy details of hidden columns.
Bug: 11788 Change-Id: I3f4df884d98903222de8a340de6a08e680687b0a Reviewed-on: https://code.wireshark.org/review/15727 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/gtk')
-rw-r--r--ui/gtk/packet_list.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/ui/gtk/packet_list.c b/ui/gtk/packet_list.c
index 98f4978a1e..6350ba74cc 100644
--- a/ui/gtk/packet_list.c
+++ b/ui/gtk/packet_list.c
@@ -1504,6 +1504,7 @@ packet_list_copy_summary_cb(gpointer data _U_, copy_summary_type copy_type)
GtkTreeModel *model;
GtkTreeSelection *selection;
GtkTreeIter iter;
+ gboolean first_col = TRUE;
if(CS_CSV == copy_type) {
text = g_string_new("\"");
@@ -1518,18 +1519,20 @@ packet_list_copy_summary_cb(gpointer data _U_, copy_summary_type copy_type)
return;
for(col = 0; col < cfile.cinfo.num_cols; ++col) {
- if(col != 0) {
- if(CS_CSV == copy_type) {
- g_string_append(text,"\",\"");
- } else {
- g_string_append_c(text, '\t');
+ if (get_column_visible(col)) {
+ if(!first_col) {
+ if(CS_CSV == copy_type) {
+ g_string_append(text,"\",\"");
+ } else {
+ g_string_append_c(text, '\t');
+ }
}
- }
-
- gtk_tree_model_get(model, &iter, packet_list_get_column_id(col), &celltext, -1);
- g_string_append(text,celltext);
- g_free(celltext);
+ gtk_tree_model_get(model, &iter, packet_list_get_column_id(col), &celltext, -1);
+ g_string_append(text,celltext);
+ g_free(celltext);
+ first_col = FALSE;
+ }
}
if(CS_CSV == copy_type) {
g_string_append_c(text,'"');