diff --git a/gnucash/gnome-utils/dialog-account.c b/gnucash/gnome-utils/dialog-account.c index c98e10fde5..e1a2f3dffe 100644 --- a/gnucash/gnome-utils/dialog-account.c +++ b/gnucash/gnome-utils/dialog-account.c @@ -2143,6 +2143,14 @@ gnc_ui_edit_account_window (GtkWindow *parent, Account *account) gtk_window_present (GTK_WINDOW(aw->dialog)); } +void +gnc_ui_new_account_with_types_and_commodity (GtkWindow *parent, QofBook *book, GList *valid_types, + gnc_commodity *default_commodity) +{ + gnc_ui_new_account_window_internal (parent, book, NULL, NULL, + valid_types, default_commodity, FALSE); +} + /* * opens up a window to create a new account * diff --git a/gnucash/gnome-utils/dialog-account.h b/gnucash/gnome-utils/dialog-account.h index 9d59b9c9c0..84eb8e7b6f 100644 --- a/gnucash/gnome-utils/dialog-account.h +++ b/gnucash/gnome-utils/dialog-account.h @@ -74,6 +74,25 @@ account_type_has_auto_interest_payment(type) ) void gnc_ui_edit_account_window (GtkWindow *parent, Account *account); +/** Display a window for creating a new account. This function will + * restrict the available account type values to the list specified + * by the caller. + * + * @param parent The widget on which to parent the dialog. + * + * @param book The book in which the new account should be created. + * This is a required argument. + * + * @param valid_types A GList of GNCAccountType gints [as pointers] + * which are allowed to be created. The calling function is + * responsible for freeing this list. + * + * @param default_commodity A gnc_commodity* to specify the default + * commodity to create. May be NULL. + */ +void gnc_ui_new_account_with_types_and_commodity (GtkWindow *parent, QofBook *book, + GList *valid_types, gnc_commodity*); + /** Display a window for creating a new account. This function will * also initially set the parent account of the new account to what * the caller specified. The user is free, however, to choose any