Fixed adding new columns from preferences.

svn path=/trunk/; revision=31091
This commit is contained in:
Stig Bjørlykke 2009-11-26 21:41:14 +00:00
parent 5fa9b50863
commit 97cbb07e58
1 changed files with 9 additions and 5 deletions

View File

@ -274,6 +274,7 @@ 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);
if (custom_field) {
clp = g_list_last(prefs.col_list); clp = g_list_last(prefs.col_list);
last_cfmt = (fmt_data *) clp->data; last_cfmt = (fmt_data *) clp->data;
if (strcmp(last_cfmt->fmt, "%i") == 0) { if (strcmp(last_cfmt->fmt, "%i") == 0) {
@ -282,6 +283,9 @@ column_prefs_add_custom(gint fmt, const gchar *title, const gchar *custom_field)
} else { } else {
prefs.col_list = g_list_append(prefs.col_list, cfmt); prefs.col_list = g_list_append(prefs.col_list, cfmt);
} }
} else {
prefs.col_list = g_list_append(prefs.col_list, cfmt);
}
} }
void void