aboutsummaryrefslogtreecommitdiffstats
path: root/ui/preference_utils.c
diff options
context:
space:
mode:
authorMichal Labedzki <michal.labedzki@tieto.com>2015-12-11 09:34:08 +0100
committerAnders Broman <a.broman58@gmail.com>2015-12-20 08:21:02 +0000
commit9bb3f6be4c18822267a64633c298e1a8f1809221 (patch)
treede9b8934c58f239e29d0227039ad7f55f3d42f06 /ui/preference_utils.c
parent7e0ec2c8eb3c88e70992dc40b130c76177b83a30 (diff)
Qt: Add missing multi-field column validation
GTK already has it, but Qt forgot about it, so multi-field custom column works ok if previously saved in GTK-shark. Invalid validation prevent from modifying and saving multi-field custom column in Qt version. While at it, rename "custom field" to "custom fields" to ensure we think about multi-field custom column. Change-Id: I99588150ccb38be11b75f5dd5b0f6443e7055ebb Reviewed-on: https://code.wireshark.org/review/12685 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/preference_utils.c')
-rw-r--r--ui/preference_utils.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ui/preference_utils.c b/ui/preference_utils.c
index 51265aa5c5..ce92c5c872 100644
--- a/ui/preference_utils.c
+++ b/ui/preference_utils.c
@@ -316,7 +316,7 @@ prefs_store_ext(const char * module_name, const char *pref_name, const char *pre
}
gint
-column_prefs_add_custom(gint fmt, const gchar *title, const gchar *custom_field, gint custom_occurrence)
+column_prefs_add_custom(gint fmt, const gchar *title, const gchar *custom_fields, gint custom_occurrence)
{
GList *clp;
fmt_data *cfmt, *last_cfmt;
@@ -330,13 +330,13 @@ column_prefs_add_custom(gint fmt, const gchar *title, const gchar *custom_field,
*/
cfmt->title = g_strdup(title);
cfmt->fmt = fmt;
- cfmt->custom_field = g_strdup(custom_field);
+ cfmt->custom_fields = g_strdup(custom_fields);
cfmt->custom_occurrence = custom_occurrence;
cfmt->resolved = TRUE;
colnr = g_list_length(prefs.col_list);
- if (custom_field) {
+ if (custom_fields) {
cfmt->visible = TRUE;
clp = g_list_last(prefs.col_list);
last_cfmt = (fmt_data *) clp->data;
@@ -365,7 +365,7 @@ column_prefs_remove_link(GList *col_link)
cfmt = (fmt_data *) col_link->data;
g_free(cfmt->title);
- g_free(cfmt->custom_field);
+ g_free(cfmt->custom_fields);
g_free(cfmt);
prefs.col_list = g_list_remove_link(prefs.col_list, col_link);
}