Correctly empty date format combobox in qif import druid. Fix #396668.

When entering the page about choosing the date format (d-m-y, etc.) the
list of entries of the combobox is to be cleared and refilled.
Therefore, loop through all entries instead of
gtk_combo_box_remove_text'ing only the first entry. Trunk-only bug.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15392 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Andreas Köhler 2007-01-16 19:43:42 +00:00
parent 3cce429ee1
commit 5611e7efd3

View File

@ -566,8 +566,15 @@ gnc_ui_qif_import_load_file_next_cb(GnomeDruidPage * page,
*/
if(SCM_LISTP(parse_return) &&
(SCM_CAR(parse_return) == SCM_BOOL_T)) {
gint n_items;
/* clear the combo box */
gtk_combo_box_set_active(GTK_COMBO_BOX(wind->date_format_combo), -1);
n_items = gtk_tree_model_iter_n_children(
gtk_combo_box_get_model(GTK_COMBO_BOX(wind->date_format_combo)), NULL);
while (n_items-- > 0)
gtk_combo_box_remove_text(GTK_COMBO_BOX(wind->date_format_combo), 0);
gtk_combo_box_remove_text(GTK_COMBO_BOX(wind->date_format_combo), 0);
if ((date_formats = scm_call_2(qif_file_parse_results,
SCM_CDR(parse_return),
scm_str2symbol("date"))) != SCM_BOOL_F) {