Bug #432457 – Security/stock import should follow tutorial regarding Account Name

The help files suggest that the user assign the stock ticker symbol as the
account name. There isn't any strong guidance in the tutorial about what the
description should be, but I think a good default is the full name of the
security. This patch accomplishes my proposal, as long as one navigates
to the right Stock parent account before Clicking New Account.

Patch by David Reiser.
BP

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17657 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming 2008-10-25 20:31:06 +00:00
parent 0c5e9709d9
commit 47a9693ce6

View File

@ -1456,6 +1456,13 @@ gnc_ui_new_account_window_internal (QofBook *book,
if (default_commodity != NULL) {
commodity = default_commodity;
if ((aw->type = ACCT_TYPE_STOCK) || (aw->type = ACCT_TYPE_MUTUAL))
{
gtk_entry_set_text(GTK_ENTRY(aw->name_entry),
(gpointer) gnc_commodity_get_mnemonic(commodity));
gtk_entry_set_text(GTK_ENTRY(aw->description_entry),
(gpointer) gnc_commodity_get_fullname(commodity));
}
} else if ((aw->type != ACCT_TYPE_STOCK) && (aw->type != ACCT_TYPE_MUTUAL)) {
commodity = parent_commodity;
} else {