-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Here's a patch scratching an itch of my own: The ability to use the name of the commodity instead of the ticker symbol in a price scatterplot.
I have commodities with odd ticker symbols (10-digit numbers) because that's what works with Finance::Quote, so it's convenient for me. Is this the right way to propose patches, by the way? Should I instead file an enhancement bug and attach the patch to that? - -- Sigve Indregard Student, Oslo -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFOUPMSgvfpVbsmAIRAvDsAKCK7qjm03kEAeodvpKodF2sHA5BGgCdFm2p HdHK8uszLQYD8SIqp56144Y= =l+s3 -----END PGP SIGNATURE-----
Index: price-scatter.scm =================================================================== --- price-scatter.scm (revisjon 15046) +++ price-scatter.scm (arbeidskopi) @@ -41,6 +41,7 @@ (define optname-report-currency (N_ "Report's currency")) (define optname-price-commodity (N_ "Price of Commodity")) (define optname-price-source (N_ "Price Source")) +(define optname-price-full-name (N_ "Use full name")) ;; (optname-accounts (N_ "Accounts")) @@ -78,6 +79,19 @@ "e" (N_ "Calculate the price of this commodity.") (gnc-locale-default-iso-currency-code))) + + (add-option + (gnc:make-multichoice-option + pagename-price optname-price-full-name + "g" (N_ "Use the full name or the ticker symbol of the commodity.") + 'mnemonic + (list (vector 'mnemonic + (N_ "Ticker symbol") + (N_ "Use only the ticker symbol of the commodity.")) + (vector 'full-name + (N_ "Full name") + (N_ "Use the full name of the commodity.")) + ))) (add-option (gnc:make-multichoice-option @@ -157,6 +171,11 @@ optname-price-commodity)) (price-source (get-option pagename-price optname-price-source)) + (price-name (if (eq? (get-option pagename-price + optname-price-full-name) + 'full-name) + (gnc-commodity-get-fullname price-commodity) + (gnc-commodity-get-mnemonic price-commodity))) (dates-list (gnc:make-date-list (gnc:timepair-end-day-time from-date-tp) @@ -182,7 +201,7 @@ chart report-title) (gnc:html-scatter-set-subtitle! chart (string-append - (gnc-commodity-get-mnemonic price-commodity) + price-name " - " (sprintf #f (_ "%s to %s")
_______________________________________________ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel