On Tue, Jan 17, 2006 at 12:47:02AM +0100, Eskil Bylund wrote: > 2006/1/16, Eskil Bylund <[EMAIL PROTECTED]>: > > Hi, > > > > Here's a patch that updates the add/edit account window. Changes are: > > > > * src/gnome/glade/account.glade > > * src/gnome-utils/dialog-account.c: Clean up the Account dialog. > > Replace the account type clist with a GtkComboBox. Update the title > > when changing parent account. > > > Attached is the new patch using gnc-tree-model-account-types, with the > change log being the same as above. Please check the glade file since > it contains some string changes, among other things...
Yes, this is better. > Should I submit a patch that hides the currency account the way > mentioned by Derek? It seems that that was the point of the valid_types struct member. So, your patch does essentially what I suggested would be the general solution to the problem of deprecating account types everywhere - in particular, the use of the filter model and filter function. > Maybe it should be hidden from other places at the > same time? Yes, and in order to take advantage of this functionality elsewhere, it needs to be in gnc-tree-model-account-types.c, not dialog-account.c. If you want to continue with this, here's what I suggest: 1) move the filter function into gnc-tree-model-account-types.c. I think it can be private because... 2) add a public convenience routine to gnc-tree-model-account-types.[ch] that will return a filter model already wrapped around the master account_types tree model. This function does the middle chunk of what your gnc_account_type_combo_box_init() does. Let this function take the "valid_types" mask, and pass it as data to the filter function setter. 3) change the filter function to take just the valid_types as data -- no need for a struct. 4) Also I think you don't have to use the sort_model. The account types tend to have a logical ordering that isn't alphabetic. That can all be in a separate patch, and then this current patch can be simplified to call the new routines in gnc-tree-model-account-types.c. What do you think? -chris _______________________________________________ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel