From 5611e7efd3ee28c87d2db03d4bdf5be12bda26c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20K=C3=B6hler?= Date: Tue, 16 Jan 2007 19:43:42 +0000 Subject: [PATCH] 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 --- src/import-export/qif-import/druid-qif-import.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/import-export/qif-import/druid-qif-import.c b/src/import-export/qif-import/druid-qif-import.c index 532b7b3422..923e5fded8 100644 --- a/src/import-export/qif-import/druid-qif-import.c +++ b/src/import-export/qif-import/druid-qif-import.c @@ -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) {