mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
GNCAccountSel with a New button
If the GNCAccountSel widget is set to be modal, using the 'New' button returns the newly created account so use it for the selection.
This commit is contained in:
parent
026856122c
commit
faaa580de7
@ -493,10 +493,15 @@ static void
|
||||
gas_new_account_click( GtkButton *b, gpointer ud )
|
||||
{
|
||||
GNCAccountSel *gas = (GNCAccountSel*)ud;
|
||||
Account *account = NULL;
|
||||
GtkWindow *parent = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gas)));
|
||||
if (gas->isModal)
|
||||
gnc_ui_new_accounts_from_name_window_with_types (parent, NULL,
|
||||
gas->acctTypeFilters );
|
||||
{
|
||||
account = gnc_ui_new_accounts_from_name_window_with_types (parent, NULL,
|
||||
gas->acctTypeFilters );
|
||||
if (account)
|
||||
gnc_account_sel_set_account (gas, account, FALSE);
|
||||
}
|
||||
else
|
||||
gnc_ui_new_account_with_types (parent, gnc_get_current_book(),
|
||||
gas->acctTypeFilters );
|
||||
|
Loading…
Reference in New Issue
Block a user