summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2017-06-22 10:48:34 -0400
committerStig Bjørlykke <stig@bjorlykke.org>2017-06-22 17:23:22 +0000
commit76b1d4871c5712ee8405828f3b01b108660fe901 (patch)
tree15aa5b950042ca945a5c2fd995329d829e0c5b5c
parent99270048bcd7fbd80a8f3ce19683f7fad5bcf1ae (diff)
downloadwireshark-76b1d4871c5712ee8405828f3b01b108660fe901.tar.gz
Qt: Restore multi custom column width and align
Put custom column field settings in quotes in the recent file to support multi custom columns which contains space. Otherwise the space will be removed in prefs_get_string_list() and the field will not match when reading the recent file. Change-Id: Ic6e2b1e02d68970a4e11fbecbe55a7b10f8b10dd Reviewed-on: https://code.wireshark.org/review/22349 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com> (cherry picked from commit 578f2a15bb7534b3aad315a92989b6e4d577e4c3) Reviewed-on: https://code.wireshark.org/review/22358 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
-rw-r--r--ui/gtk/packet_list.c2
-rw-r--r--ui/qt/packet_list.cpp4
2 files changed, 2 insertions, 4 deletions
diff --git a/ui/gtk/packet_list.c b/ui/gtk/packet_list.c
index 6350ba74cc..5adfbb7702 100644
--- a/ui/gtk/packet_list.c
+++ b/ui/gtk/packet_list.c
@@ -1632,7 +1632,7 @@ packet_list_recent_write_all(FILE *rf)
for (col = 0; col < num_cols; col++) {
col_fmt = get_column_format(col);
if (col_fmt == COL_CUSTOM) {
- fprintf (rf, " %%Cus:%s,", get_column_custom_fields(col));
+ fprintf (rf, " \"%%Cus:%s\",", get_column_custom_fields(col));
} else {
fprintf (rf, " %s,", col_format_to_string(col_fmt));
}
diff --git a/ui/qt/packet_list.cpp b/ui/qt/packet_list.cpp
index 2a81d446c5..e966d6deaf 100644
--- a/ui/qt/packet_list.cpp
+++ b/ui/qt/packet_list.cpp
@@ -604,7 +604,6 @@ void PacketList::contextMenuEvent(QContextMenuEvent *event)
ctx_menu_.exec(event->globalPos());
ctx_column_ = -1;
decode_as_->setData(QVariant());
-
}
// Auto scroll if:
@@ -995,7 +994,7 @@ void PacketList::writeRecent(FILE *rf) {
}
col_fmt = get_column_format(col);
if (col_fmt == COL_CUSTOM) {
- fprintf (rf, " %%Cus:%s,", get_column_custom_fields(col));
+ fprintf (rf, " \"%%Cus:%s\",", get_column_custom_fields(col));
} else {
fprintf (rf, " %s,", col_format_to_string(col_fmt));
}
@@ -1007,7 +1006,6 @@ void PacketList::writeRecent(FILE *rf) {
}
}
fprintf (rf, "\n");
-
}
bool PacketList::contextMenuActive()