GNOME Bugzilla – Bug 339127
The applet only supports US Dollars
Last modified: 2010-07-12 19:09:09 UTC
Please describe the problem: Since yahoo uses the currency of the stock market the applet will be very confusing to use. Example. A stock in the oslo stock market will be specified in NOK on yahoo, the applet asks for US Dollars. If you calc the cost in US Dollars thigs will however be totally messed up since the applet will use the NOK value from yahoo. I suggest to just drop the $ sign and let the use specify the currency per stock entry. Steps to reproduce: 1. 2. 3. Actual results: Expected results: Does this happen every time? Other information:
*** Bug 339128 has been marked as a duplicate of this bug. ***
from above bug: It would be nice to be able to specify the currency to display and recalculate the stock value in to that value depending on the current value of the currency. Example. I'm from sweden. I buy a stock in Euro (€). It would then be nice if it could calculate the value of my stocks and +/- from Euro to SEK when it is shown. This might also be required to be able to handle the case when I buy different stocks in USD and EUR, to calculate the total value.
This require some heavy change in the codebase to convert the values to the right currency, and thus download the conversion rates and so on. Patches welcome :)
Created attachment 154060 [details] [review] adds multi-currency support: automatic conversion of foreign currencies into a local one
The above patch adds the missing multi-currency support. A local currency can be specified in the preferences. When given, all shares' values are converted into that local currency and displayed in the widget. If shares are purchased in foreign currency, the exchange rate at that time has to be specified in a new field. If they were bought in the local currency, this field simply stays empty (0.0). Then, the current value and balance are properly computed in the local currency. For more details see the related bug #609547.
Very nice, it works nicely with one minor bug: 'positions balance' is a sum of gains in different currencies and lacks the local currency indication.
What do you mean, please provide a particular example that I can reproduce.
Created attachment 154160 [details] positions balance
The applet icon has a tooltip which says what is the balance of the portfolio, as a sum of each gain for every single position. This sum is calculated as a sum of gains which is not converted in the local currency and thus might sum euros with dollars (line 257 in quotes.py). Here you can find a test with different currencies. The applet correctly calculates single positions gains showed in the popup window together with their currency (GBp exchange rate is not found, so gain in GBp is showed, nice!). Not considering the GBp position (+5930 GBp), gains are: +17173 EUR (+23989 USD), -827 EUR (0 DKK), -502 EUR which make a total of 15844 EUR while the tooltip shows 29417 (without specifing a currency) which is 5930+23989+0-502. [amounts are not exact, due to market movements :) ]
You are right, I totally forgot about the tool tip ;-) I will fix that.
Created attachment 155147 [details] [review] extension of the previous patch, also makes the applet tooltip support currencies This extended patch also makes the applet tooltip support currencies.
Created attachment 155148 [details] Shows currency support with no overall currency configured
Created attachment 155149 [details] Shows currency support with an overall currency configured
feature is added in http://git.gnome.org/browse/gnome-applets/commit/?id=3a8c4d4034c6c09f7c39d5943f37824da0919edb
Enrico: Thanks so much for adding this!
You are very much welcome! Did you test it yet?