[gnome-applets] invest-applet: fixed broken charts for European markets, see bug 642470



commit f915b5198230a6040fdedc4f46442fe7b5a4ccad
Author: Enrico Minack <enrico-minack gmx de>
Date:   Fri Mar 18 19:51:29 2011 +0100

    invest-applet: fixed broken charts for European markets, see bug 642470

 invest-applet/invest/chart.py  |    2 +-
 invest-applet/invest/quotes.py |    5 +----
 2 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/invest-applet/invest/chart.py b/invest-applet/invest/chart.py
index c6caff7..15803b6 100644
--- a/invest-applet/invest/chart.py
+++ b/invest-applet/invest/chart.py
@@ -206,7 +206,7 @@ class FinancialChart:
 				a += "%s%s," % (name[1:], param)
 		
 		# Create the image URL -----------------------------------------------------
-		chart_base_url = "http://ichart.europe.yahoo.com/z?s=%(s)s&t=%(t)s&q=%(q)s&l=%(l)s&z=%(z)s&p=%(p)s&a=%(a)s%(opt)s"
+		chart_base_url = "http://chart.finance.yahoo.com/z?s=%(s)s&t=%(t)s&q=%(q)s&l=%(l)s&z=%(z)s&p=%(p)s&a=%(a)s%(opt)s"
 		url = chart_base_url % {
 			"s": tickers[0],
 			"t": self.time_ranges[self.ui.get_object("t").get_active()],
diff --git a/invest-applet/invest/quotes.py b/invest-applet/invest/quotes.py
index b7ec21b..2b8918f 100644
--- a/invest-applet/invest/quotes.py
+++ b/invest-applet/invest/quotes.py
@@ -281,10 +281,7 @@ class QuoteUpdater(gtk.ListStore):
 					row = self.insert(0, [ticker, label, val["currency"], False, balance, change, val["trade"], val["variation_pct"], pb])
 					self.add_balance_change(balance, change, val["currency"])
 
-				if len(ticker.split('.')) == 2:
-					url = 'http://ichart.europe.yahoo.com/h?s=%s' % ticker
-				else:
-					url = 'http://ichart.yahoo.com/h?s=%s' % ticker
+				url = 'http://ichart.yahoo.com/h?s=%s' % ticker
 
 				image_retriever = invest.chart.ImageRetriever(url)
 				image_retriever.connect("completed", self.set_pb_callback, row)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]