AUDIT: r17657 - gnucash/trunk/src/gnome-utils - Bug #432457 – Security/stock import should follow tutorial regarding Account Name

Christian Stimming cstim at cvs.gnucash.org
Sat Oct 25 16:31:06 EDT 2008


Author: cstim
Date: 2008-10-25 16:31:06 -0400 (Sat, 25 Oct 2008)
New Revision: 17657
Trac: http://svn.gnucash.org/trac/changeset/17657

Modified:
   gnucash/trunk/src/gnome-utils/dialog-account.c
Log:
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

Modified: gnucash/trunk/src/gnome-utils/dialog-account.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-account.c	2008-10-25 20:30:58 UTC (rev 17656)
+++ gnucash/trunk/src/gnome-utils/dialog-account.c	2008-10-25 20:31:06 UTC (rev 17657)
@@ -1456,6 +1456,13 @@
 
   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 {



More information about the gnucash-changes mailing list