Check for custom column before using custom_field.
Store hidden columns correctly. svn path=/trunk/; revision=33288
This commit is contained in:
parent
017e4d0dc0
commit
2e5c2b805f
|
@ -3015,7 +3015,7 @@ write_prefs(char **pf_path_return)
|
||||||
}
|
}
|
||||||
if (!cfmt->visible) {
|
if (!cfmt->visible) {
|
||||||
if (strlen (cols_hidden->str)) {
|
if (strlen (cols_hidden->str)) {
|
||||||
g_string_append (cols_hidden, ", ");
|
g_string_append (cols_hidden, ",");
|
||||||
}
|
}
|
||||||
g_string_append (cols_hidden, prefs_fmt);
|
g_string_append (cols_hidden, prefs_fmt);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3351,7 +3351,7 @@ rebuild_visible_columns_menu (void)
|
||||||
GList *clp;
|
GList *clp;
|
||||||
fmt_data *cfmt;
|
fmt_data *cfmt;
|
||||||
gchar *title;
|
gchar *title;
|
||||||
gint i, col_id;
|
gint i, col_id, cur_fmt;
|
||||||
|
|
||||||
menu_columns[0] = gtk_item_factory_get_widget(main_menu_factory, "/View/Displayed Columns");
|
menu_columns[0] = gtk_item_factory_get_widget(main_menu_factory, "/View/Displayed Columns");
|
||||||
menu_columns[1] = gtk_item_factory_get_widget(packet_list_heading_factory, "/Displayed Columns");
|
menu_columns[1] = gtk_item_factory_get_widget(packet_list_heading_factory, "/Displayed Columns");
|
||||||
|
@ -3364,7 +3364,8 @@ rebuild_visible_columns_menu (void)
|
||||||
col_id = 0;
|
col_id = 0;
|
||||||
while (clp) {
|
while (clp) {
|
||||||
cfmt = (fmt_data *) clp->data;
|
cfmt = (fmt_data *) clp->data;
|
||||||
if (cfmt->custom_field) {
|
cur_fmt = get_column_format_from_str(cfmt->fmt);
|
||||||
|
if (cur_fmt == COL_CUSTOM) {
|
||||||
title = g_strdup_printf ("%s (%s)", cfmt->title, cfmt->custom_field);
|
title = g_strdup_printf ("%s (%s)", cfmt->title, cfmt->custom_field);
|
||||||
} else {
|
} else {
|
||||||
title = g_strdup_printf ("%s (%s)", cfmt->title, col_format_desc(cfile.cinfo.col_fmt[col_id]));
|
title = g_strdup_printf ("%s (%s)", cfmt->title, col_format_desc(cfile.cinfo.col_fmt[col_id]));
|
||||||
|
|
Loading…
Reference in New Issue