Invest applet renders incorrectly

Bug #59060 reported by Trey Ethridge
60
Affects Status Importance Assigned to Milestone
GNOME Applets
Fix Released
Medium
gnome-applets (Ubuntu)
Fix Released
Low
Ubuntu Desktop Bugs

Bug Description

Binary package hint: gnome-applets

The "Invest" applet in Edgy "knot 2" renders incorrectly. The icon appears correctly, but there is a grey block to the right of the icon. I imagine that it is a rendering bug. I'll attach a screen shot.

Revision history for this message
Trey Ethridge (tethridge) wrote :
Revision history for this message
Daniel Holbach (dholbach) wrote :

Thanks for your bug report. Confirmed with gnome-applets 2.16.0.1

Changed in gnome-applets:
assignee: nobody → desktop-bugs
importance: Untriaged → Low
status: Unconfirmed → Confirmed
Revision history for this message
Vassilis Pandis (pandisv) wrote :

Forwarded upstream ...

Changed in gnome-applets:
status: Unconfirmed → Unknown
Revision history for this message
Vassilis Pandis (pandisv) wrote :

For the record, I can reproduce this on current Edgy as well.

Changed in gnome-applets:
status: Unknown → Unconfirmed
Revision history for this message
Herbert V. Riedel (hvr) wrote :

btw, in a screenshot from the author's webpage, it seems the applet is supposed to create a 'total' summary of all stocks (which it doesn't right now in edgy):

http://raphael.slinckx.net/images/invest-applet-1.png

Revision history for this message
2hansen (bo2hansen) wrote :

Bug still present in latest Edgy (as of Oct. 20)

Revision history for this message
Bertrand Collignon (bd-collignon) wrote :

I added the invest applet on my top panel... I also have the grey block to the right of the icon + the applet doesn't "do" anything and I can't remove it (no reaction on left, middle or right click). Any info on how to remove it?

Revision history for this message
Sebastien Bacher (seb128) wrote : Re: [Bug 59060] Re: Invest applet renders incorrectly

Le jeudi 07 décembre 2006 à 20:59 +0000, Bertrand Collignon a écrit :
> I added the invest applet on my top panel... I also have the grey block
> to the right of the icon + the applet doesn't "do" anything and I can't
> remove it (no reaction on left, middle or right click). Any info on how
> to remove it?

stop it from gnome-system-monitor and tell to the panel to not reload it
then

Revision history for this message
Bertrand Collignon (bd-collignon) wrote :

Can you tell me the name of the process in the gnome-system-monitor? I just can't locate it (sorry, still very new to Linux)
And how do I "tell the panel to not reload it"?
Thanks

Revision history for this message
Sebastien Bacher (seb128) wrote :

Le vendredi 08 décembre 2006 à 01:29 +0000, Bertrand Collignon a écrit :
> Can you tell me the name of the process in the gnome-system-monitor? I just can't locate it (sorry, still very new to Linux)
> And how do I "tell the panel to not reload it"?
> Thanks

The binary is named /usr/lib/gnome-applets/invest-applet. If you stop it
you will get a dialog from the panel asking if you want to reload it,
just click on "no"

Revision history for this message
Trey Ethridge (tethridge) wrote :

I've discovered that what appears to be unused grey space to the right of the applet is probably intentional. If you right click on the grey space you will see the options for removal.

The grey space will change colors as your stock prices rise and fall. I feel that this is a poor design since so many misunderstand what is happening.

Hope this helps.

Revision history for this message
2hansen (bo2hansen) wrote :

But if you look at the author's website ( http://raphael.slinckx.net/blog/2006-01-18/stock-trading-yay - the Screenshots section) the coloured field has a somewhat different (and more apparent) interpretation.

Revision history for this message
Bertrand Collignon (bd-collignon) wrote :

Thanks a lot for your comment, Trey, I indeed had to right click on the grey space to be able to see the options, not only for removal, but for setting up preferences, etc., and it worked :o)

Sebastien, thanks for your comments too, as I can now see a bit better how things work.

Revision history for this message
Carlo Facci (cieffe) wrote :

Still present in Feisty (version 2.16.2)

But if you insert price and a quantity of stocks the gray space disappear.

Revision history for this message
Herbert V. Riedel (hvr) wrote :

well I took a look at the code and the changelog, and found out for some questionable reasons, the behaviour was changed from displaying the numeric worth of all investments to a color-trend based on the worth change...

but looking at the code itself revealed, that the calculation seem rather broken:

in the code below, the lines in the iterations should rather read like

  var = row[updater.VARIATION]
  now = row[updater.VALUE]
  start = now - var

to make more sense imho... also the color-scale sensitivity might be a candidate for the preference dialog, as it might need considerable (relative) worth-changes to cause a noticeable color change, depending on the investments done...

(from http://svn.gnome.org/viewcvs/gnome-applets/trunk/invest-applet/invest/widgets.py?view=markup)
class InvestTrend(gtk.Image):
...
def on_quotes_update(self, updater):
  start_total = 0
  now_total = 0
  for row in updater:
   # Don't count the ticker only symbols in the color-trend
   if row[updater.TICKER_ONLY]:
    continue

   var = row[updater.VARIATION]/100
   now = row[updater.VALUE]

   start = now / (1 + var)

   portfolio_number = sum([purchase["amount"] for purchase in invest.STOCKS[row[updater.SYMBOL]]])
   start_total += start * portfolio_number
   now_total += now * portfolio_number

  day_var = (now_total - start_total) / start_total * 100
  color = int(2*day_var)
  opacity = min(0xFF, int(abs(127.5*day_var)))
  if day_var < 0:
   color = COLORSCALE_NEGATIVE[min(len(COLORSCALE_NEGATIVE)-1, abs(color))]
  else:
   color = COLORSCALE_POSITIVE[min(len(COLORSCALE_POSITIVE)-1, abs(color))]

  self.set_color(color, opacity)

Revision history for this message
Herbert V. Riedel (hvr) wrote :

additional note I forgot:

"row[updater.VARIATION]" seems to return the absolute change, not the relative change in percent

Revision history for this message
Mike Mosseri (mike-mosseri) wrote : Solution

There are two problems occurring here and both exhibit the same behavior.

The first and easiest is when a user does not have a price or quantity of stocks. Easily fixed.

The second is more elusive. It has to do with libhttp.so and it being moved out of libgnomevfs2-common and into libgnomevfs2-extra.

This is shown here: http://<email address hidden>/msg113515.html

A simple apt-get install libgnomevfs2-extra will solve this second problem.

Also note, this does happen with the weather applet too since it relies on libhttp for its data.

Mike (http://www.mosseri.org/blog/archives/2007/03/gnome_invest_applet.html)

Revision history for this message
puzza007 (puzza007) wrote :

This fix didn't work for me. I have:

electra ~/ locate libhttp.so
/usr/lib/gnome-vfs-2.0/modules/libhttp.so
electra ~/

but still see only the coloured square to the right. Hard to translate the colour to the performance of my shares. Is orange good or bad? ;)

Revision history for this message
Bob Price (bobp0328) wrote : Re: Invest applet broken and breaks Applications applet

The fixes mentioned above don't work for me because the invest applet doesn't show in the System Monitor list (yes, I have all processes shown:) ) -- in addition, the Applications applet stopped working when I added Invest to the panel. Performed the "apt-get install libgnomevfs2-extra" mentioned above and I already have the most recent version.

Revision history for this message
Bob Price (bobp0328) wrote :

I was able to remove the Invest applet by running "ps lax | grep invest", then "kill (pid)" -- at that point I got the reload/no dialog and chose no. Unfortunately the Gnome Applications applet is still disabled even after a full system shutdown and reboot. Any hints on how to get it to work again?

Revision history for this message
Glyphobet (glyphobet) wrote :

I can confirm that this bug still exists in Edgy as of 2007-07-21. The non-functional color block next to the invest applet button is still there. If the color block is really meant to indicate the overall performance of your stock symbols, you should be able to disable it in the preferences, since obviously a bunch of smart programmers cannot figure out how orange, or grey, or purple (in my case) is supposed to translate into a performance rating.

The following two bugs are incorrectly marked as duplicates of this bug:

https://bugs.launchpad.net/ubuntu/+source/gnome-applets/+bug/89238
https://bugs.launchpad.net/ubuntu/+source/gnome-applets/+bug/118398

Bugs #89238 and #118398 are in regards to being unable to remove the invest-applet from the panel, which is not a problem for me. I can remove the invest-applet from the panel by right clicking and selecting "remove from panel."

In addition, the fix proposed here, installing libgnomevfs2-extra, does not appear to be causing the non-functional color block. I already have libgnomevfs2-extra installed and up-to-date, and I am still experiencing the non-functional color block. Reinstalling and reconfiguring libgnomevfs2-extra does not fix the problem. Perhaps installing libgnomevfs2-extra is meant to fix the problem with removing the applet from the panel.

Changed in gnome-applets:
status: Confirmed → Triaged
Revision history for this message
David Planella (dpm) wrote :

I can confirm this on Feisty and Gutsy.

Revision history for this message
Ari (ari-reads) wrote :

just to confirm that the invest applet is still broken and nonfunctional under 7.10. Not only it doesn't do anything (it can't be set up, no context menu, no preferences), there is also no way to uninstall it other than the workarounds discussed above.

looks like this applet has been been broker for a year or two. sad gnome doesn't provide an option to monitor stocks. most of us don't care a lot about this but it's important for the average joe. Also I guess ubuntu shouldn't ship badly broken applets as this discourages new users.

Revision history for this message
Sebastien Bacher (seb128) wrote :

the applet should not be installed in hardy if the issue is not fixed, milestoning the bug

Changed in gnome-applets:
milestone: none → ubuntu-8.04
Revision history for this message
Everthon Valadão (valadao) wrote :

1) the invest-chart application still broken in my ubuntu 7.10: when I try to set any stock, the chart doesn't load and I just get a 'ValueError':
 Traceback (most recent call last):
   File "/var/lib/python-support/python2.5/invest/chart.py", line 171, in <lambda>
     gnomevfs.async.open(url, lambda h,e: self.on_chart_open(h,e,url))
   File "/var/lib/python-support/python2.5/invest/chart.py", line 186, in on_chart_open
     handle.close(lambda *args: None)
 ValueError: I/O operation on closed handle

2) the applet version works partially: it shows my stocks (e.g. GOOG, ^BVSP) numerically, but the so called "non-functional color block" near the applet version shows some ugly and unintelligible colors (grey, green and red), and i really would like to disable it via preferences, or replace it by some kind of mini-chart...

Revision history for this message
Everthon Valadão (valadao) wrote :

sorry, i forgot to attach the apport report...

Revision history for this message
crashvk (dsantos-lncc) wrote :

Only to confirm that the invest-applet 2.18.0 is still broken and nonfunctional under 7.04. Here occurs the same problem posted by Trey Ethridge (first report).

If I click with left button on invest icon, it shows me a panel with my stocks. I it shows ok. But if I do a double-click on some stock it opens a panel that the graphic never function.

Revision history for this message
Sebastien Bacher (seb128) wrote :

not really something urgent to fix for hardy

Changed in gnome-applets:
milestone: ubuntu-8.04 → none
Revision history for this message
Herbert V. Riedel (hvr) wrote :

yeah... it's been around since edgy, so I guess it can wait a couple of more releases until it gets fixed... eventually ;)

Revision history for this message
Matteo Z (matteozandi) wrote :

this bug has been fixed upstream

Changed in gnome-applets:
status: Triaged → Fix Committed
Changed in gnome-applets:
status: New → Fix Released
Revision history for this message
Sebastien Bacher (seb128) wrote :

the new version is in intrepid now

Changed in gnome-applets:
status: Fix Committed → Fix Released
Changed in gnome-applets:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.