forked from osmocom/wireshark
Fixed adding new columns from preferences.
svn path=/trunk/; revision=31091
This commit is contained in:
parent
5fa9b50863
commit
97cbb07e58
|
@ -274,11 +274,15 @@ column_prefs_add_custom(gint fmt, const gchar *title, const gchar *custom_field)
|
||||||
cfmt->fmt = g_strdup(col_format_to_string(fmt));
|
cfmt->fmt = g_strdup(col_format_to_string(fmt));
|
||||||
cfmt->custom_field = g_strdup(custom_field);
|
cfmt->custom_field = g_strdup(custom_field);
|
||||||
|
|
||||||
clp = g_list_last(prefs.col_list);
|
if (custom_field) {
|
||||||
last_cfmt = (fmt_data *) clp->data;
|
clp = g_list_last(prefs.col_list);
|
||||||
if (strcmp(last_cfmt->fmt, "%i") == 0) {
|
last_cfmt = (fmt_data *) clp->data;
|
||||||
/* Last column is COL_INFO, add custom column before this */
|
if (strcmp(last_cfmt->fmt, "%i") == 0) {
|
||||||
prefs.col_list = g_list_insert(prefs.col_list, cfmt, g_list_length(prefs.col_list)-1);
|
/* Last column is COL_INFO, add custom column before this */
|
||||||
|
prefs.col_list = g_list_insert(prefs.col_list, cfmt, g_list_length(prefs.col_list)-1);
|
||||||
|
} else {
|
||||||
|
prefs.col_list = g_list_append(prefs.col_list, cfmt);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
prefs.col_list = g_list_append(prefs.col_list, cfmt);
|
prefs.col_list = g_list_append(prefs.col_list, cfmt);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue