From 47a9693ce6366f602dcb3e2ade5a747384e99ffa Mon Sep 17 00:00:00 2001 From: Christian Stimming Date: Sat, 25 Oct 2008 20:31:06 +0000 Subject: [PATCH] =?UTF-8?q?Bug=20#432457=20=E2=80=93=20Security/stock=20im?= =?UTF-8?q?port=20should=20follow=20tutorial=20regarding=20Account=20Name?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/gnome-utils/dialog-account.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gnome-utils/dialog-account.c b/src/gnome-utils/dialog-account.c index 299aaaa433..0b2538b9cc 100644 --- a/src/gnome-utils/dialog-account.c +++ b/src/gnome-utils/dialog-account.c @@ -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 {