From bbef2a87ffc7252fe793f123460569d47b0debaf Mon Sep 17 00:00:00 2001 From: Jim Young Date: Thu, 20 Dec 2018 00:45:11 -0500 Subject: [PATCH] Better format for the recent file's column.width preference Write the "Packet list column pixel widths" preference value in a format that is both more human friendly and is more consistent with other similarly formatted multivalued preference values. From this ... > # Packet list column pixel widths. > # Each pair of strings consists of a column format and its pixel width. > column.width: %m, 75, %t, 72, %s, 113, %d, 113, %p, 92, %L, 82, %i, 475 To this ... > # Packet list column pixel widths. > # Each pair of strings consists of a column format and its pixel width. > column.width: > %m, 75, > %t, 72, > %s, 113, > %d, 113, > %p, 92, > %L, 82, > %i, 475 The preference reading code already accepts this new format. Change-Id: Id731ec81e8ebf87ecfb268e48dfeaa96d8e00668 Reviewed-on: https://code.wireshark.org/review/31140 Petri-Dish: Jim Young Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- ui/qt/packet_list.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ui/qt/packet_list.cpp b/ui/qt/packet_list.cpp index f1750e6baa..20701e153b 100644 --- a/ui/qt/packet_list.cpp +++ b/ui/qt/packet_list.cpp @@ -999,16 +999,16 @@ void PacketList::writeRecent(FILE *rf) { gint col, width, col_fmt; gchar xalign; - fprintf (rf, "%s:", RECENT_KEY_COL_WIDTH); + fprintf (rf, "%s:\n", RECENT_KEY_COL_WIDTH); for (col = 0; col < prefs.num_cols; col++) { if (col > 0) { - fprintf (rf, ","); + fprintf (rf, ",\n"); } 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)); + fprintf (rf, " %s,", col_format_to_string(col_fmt)); } width = recent_get_column_width (col); xalign = recent_get_column_xalign (col);