r17698 - gnucash/branches/2.2/src/gnome-utils - [r17657] Bug #432457 – Security/stock import should follow tutorial regarding Account Name

Christian Stimming cstim at cvs.gnucash.org
Sat Nov 15 16:41:23 EST 2008


Author: cstim
Date: 2008-11-15 16:41:22 -0500 (Sat, 15 Nov 2008)
New Revision: 17698
Trac: http://svn.gnucash.org/trac/changeset/17698

Modified:
   gnucash/branches/2.2/src/gnome-utils/dialog-account.c
Log:
[r17657] 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.

Modified: gnucash/branches/2.2/src/gnome-utils/dialog-account.c
===================================================================
--- gnucash/branches/2.2/src/gnome-utils/dialog-account.c	2008-11-15 21:41:13 UTC (rev 17697)
+++ gnucash/branches/2.2/src/gnome-utils/dialog-account.c	2008-11-15 21:41:22 UTC (rev 17698)
@@ -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