diff options
author | Jeremy Bicha <jbicha@debian.org> | 2021-09-19 08:31:04 -0400 |
---|---|---|
committer | Jeremy Bicha <jbicha@debian.org> | 2021-09-19 08:31:04 -0400 |
commit | 8be77dbb38d2d96e66cadc38a9adb30f161c7ad0 (patch) | |
tree | d6d626e993d2ba4c301cb27346022e568d965c21 /src/forms.c | |
parent | New upstream version 3.32.0 (diff) | |
parent | Bump version for 3.41.0 (diff) | |
download | zenity-8be77dbb38d2d96e66cadc38a9adb30f161c7ad0.tar.gz zenity-8be77dbb38d2d96e66cadc38a9adb30f161c7ad0.tar.bz2 zenity-8be77dbb38d2d96e66cadc38a9adb30f161c7ad0.zip |
New upstream version 3.41.0
Diffstat (limited to 'src/forms.c')
-rw-r--r-- | src/forms.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/forms.c b/src/forms.c index 4e6fca5d..15df7189 100644 --- a/src/forms.c +++ b/src/forms.c @@ -110,8 +110,15 @@ zenity_forms_create_and_fill_list ( tree_view = gtk_tree_view_new (); if (forms_data->column_values) { + int columns_values_count = + g_slist_length (forms_data->column_values); + int column_number = 0; + if (list_number < columns_values_count) { + column_number = list_number; + } + column_values = - g_slist_nth_data (forms_data->column_values, list_number); + g_slist_nth_data (forms_data->column_values, column_number); if (column_values) { gchar **values = g_strsplit_set (column_values, "|", -1); if (values) { @@ -130,6 +137,10 @@ zenity_forms_create_and_fill_list ( column_index++; } } + } else { + /* If no values available, add one with string type*/ + column_types = g_new (GType, n_columns); + column_types[0] = G_TYPE_STRING; } } |