Do not set active element of GncAccountSel to the first sometimes.

In gas_populate_list, the currently selected account is searched in
the new data, falling back to the first element in the list and
selecting it afterwards.  So, often "Assets" is activated, whereas the
filtering happening later does not deselect it in any way (the user
may have typed it in).

This patch simply removes the fallback to element 1.  To make the gas
look better, it may help to set it initially, like to an entry that
was used recently.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16773 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Andreas Köhler 2007-12-30 19:59:06 +00:00
parent 0730d8150d
commit d64941008c

View File

@ -183,7 +183,7 @@ gas_populate_list( GNCAccountSel *gas )
Account *acc;
GtkTreeIter iter;
GtkEntry *entry;
gint i, active = 0;
gint i, active = -1;
GList *accts, *ptr, *filteredAccts;
gchar *currentSel, *name;
@ -218,7 +218,8 @@ gas_populate_list( GNCAccountSel *gas )
/* If the account which was in the text box before still exists, then
* reset to it. */
gtk_combo_box_set_active(GTK_COMBO_BOX(gas->combo), active);
if (active != -1)
gtk_combo_box_set_active(GTK_COMBO_BOX(gas->combo), active);
g_list_free( filteredAccts );
if ( currentSel ) {