summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2017-06-22 10:48:34 -0400
committerAnders Broman <a.broman58@gmail.com>2017-06-22 15:57:12 +0000
commit578f2a15bb7534b3aad315a92989b6e4d577e4c3 (patch)
tree966dea75bdbdfc9a244619cc134427cf184049c1 /ui
parent130b514be216e8ccc42c6831f62ecb23e9b83917 (diff)
downloadwireshark-578f2a15bb7534b3aad315a92989b6e4d577e4c3.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>
Diffstat (limited to 'ui')
-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()