pushing last changes for 0.3 version
authorDaniel Martin Yerga <yerga@ubuntu.(none)>
Wed, 18 Nov 2009 15:34:38 +0000 (16:34 +0100)
committerDaniel Martin Yerga <yerga@ubuntu.(none)>
Wed, 18 Nov 2009 15:34:38 +0000 (16:34 +0100)
changelog
debian/changelog
debian/control
debian/postinst
debian/rules
settings.py
setup.py
stockthis
stockthis.py

index 010c5a3..afe442c 100644 (file)
--- a/changelog
+++ b/changelog
@@ -1,7 +1,16 @@
+2009-10-28  Daniel Martin Yerga  <dyerga@gmail.com>
+
+  * Fixed: It uses existing browser window instead of a new one: MB #5802
+
 2009-10-24  Daniel Martin Yerga  <dyerga@gmail.com>
 
   * Improved the alignment of the labels in quotes view.
   * Made all views agnostic to portrait/landscape orientation.
+  * Installing in the right opt place now (no maemo-optify).
+  * Deleted "StockThis" from all window titles.
+  * Log gets better information now.
+  * Shows an informative banner at starting about high data costs.
+  * Fixed a bug with the search.
 
 2009-10-23   Daniel Martin Yerga  <dyerga@gmail.com>
 
index 6d70589..460519d 100644 (file)
@@ -1,3 +1,27 @@
+stockthis (0.3-1) fremantle; urgency=low
+
+  * Fixed: It uses existing browser window instead of a new one: MB #5802
+
+ -- Daniel Martin Yerga <dyerga@gmail.com>  Fri, 30 Oct 2009 20:54:00 +0200
+
+stockthis (0.3~beta3) fremantle; urgency=low
+
+  * Fixed: some incorrect company-symbol when searching.
+
+ -- Daniel Martin Yerga <dyerga@gmail.com>  Sat, 24 Oct 2009 19:11:00 +0200
+
+stockthis (0.3~beta2) fremantle; urgency=low
+
+  * Added support for portrait mode.
+  * Improved the alignment of the labels in quotes view.
+  * Made all views agnostic to portrait/landscape orientation.
+  * Installing in the right opt place now (no maemo-optify).
+  * Deleted "StockThis" from all window titles (cleaner titles now).
+  * Log gets better information now.
+  * Shows an informative banner at starting about high data costs.
+
+ -- Daniel Martin Yerga <dyerga@gmail.com>  Sat, 24 Oct 2009 18:26:00 +0200
+
 stockthis (0.3~beta1) fremantle; urgency=low
 
   * Using maemo-optify to save root space in the N900.
index ba2e861..2911cde 100644 (file)
@@ -2,7 +2,7 @@ Source: stockthis
 Section: user/office
 Priority: optional
 Maintainer: Daniel Martín Yerga <dyerga@gmail.com>
-Build-Depends: debhelper (>= 4.0.0), python-dev, maemo-optify
+Build-Depends: debhelper (>= 4.0.0), python-dev
 Standards-Version: 3.6.2
 XSBC-Bugtracker: https://bugs.maemo.org/enter_bug.cgi?product=StockThis
 
@@ -10,7 +10,7 @@ Package: stockthis
 XB-Maemo-Display-Name: StockThis
 Architecture: all
 Depends: python, python-dbus, python-hildon (>= 0.9.0-1maemo11), python-gtk2, python-ystockquote, python-pycurl, python-osso (>= 0.3-2maemo4)
-Description: A stocks application.
+Description: The most complete stockquotes mobile application.
  StockThis is a simple application to show quotes from the most important world markets.
  Also, it shows  graphs with the changes in different amount of time.
  It gets data from Yahoo Finance.
index 7980208..9d20596 100755 (executable)
@@ -3,7 +3,4 @@
 ## debian/postinst : postinstallation script for stockthis
 ## ----------------------------------------------------------------------
 
-## ----------------------------------------------------------------------
-set -e
-
 gtk-update-icon-cache -f /usr/share/icons/hicolor
index a546965..9a1eb2b 100644 (file)
@@ -61,7 +61,6 @@ binary-arch: build install
        dh_installdeb
        dh_shlibdeps
        dh_gencontrol
-       maemo-optify
        dh_md5sums
        dh_builddeb
 
index 0419ef8..c5e964a 100644 (file)
@@ -61,6 +61,6 @@ def define_paths(locally, HOME):
     if locally:
         imgdir = 'pixmaps/'
     else:
-        imgdir = '/usr/share/stockthis/pixmaps/'
+        imgdir = '/opt/stockthis/pixmaps/'
 
     return settingsdb, imgdir, configdir, logfile
index 647edc1..1530578 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -19,7 +19,7 @@ from distutils.core import setup
 
 # files to install
 inst_desktop = ['stockthis.desktop']
-inst_py = ['stockthis.py', 'marketdata.py', 'settings.py']
+inst_py = ['stockthis.py', 'marketdata.py', 'settings.py', 'portrait.py']
 pixmaps = ['pixmaps/stockthis.png', 'pixmaps/maemoorg.png']
 inst_dbus = ['stockthis.service']
 inst_icon = ['stockthis.png']
@@ -28,8 +28,8 @@ sh_bin = ['stockthis']
 
 data_files = [
   ('share/applications/hildon', inst_desktop),
-  ('share/stockthis',   inst_py),
-  ('share/stockthis/pixmaps',   pixmaps),
+  ('/opt/stockthis',   inst_py),
+  ('/opt/stockthis/pixmaps',   pixmaps),
   ('share/icons/hicolor/26x26/hildon/',   inst_icon),
   ('share/icons/hicolor/scalable/hildon/',   inst_icon_sca),
   ('share/dbus-1/services',   inst_dbus),
index 8f246bb..38ee6aa 100755 (executable)
--- a/stockthis
+++ b/stockthis
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-PROGRAM=/usr/share/stockthis/stockthis.py
+PROGRAM=/opt/stockthis/stockthis.py
 PYTHON=`which python2.5`
 
 $PYTHON $PROGRAM
index c2a8b01..647e077 100644 (file)
@@ -38,7 +38,7 @@ osso_c = osso.Context("net.yerga.stockthis", "0.3", False)
 #detect if is ran locally or not
 runningpath = sys.path[0]
 
-if '/usr/share' in runningpath:
+if '/opt/' in runningpath:
     runninglocally = False
 else:
     runninglocally = True
@@ -48,7 +48,6 @@ HOME = os.path.expanduser("~")
 settingsdb, imgdir, configdir, logfile = \
     settings.define_paths(runninglocally, HOME)
 
-
 logger = logging.getLogger('st')
 logging.basicConfig(filename=logfile,level=logging.ERROR, filemode='w')
 
@@ -113,6 +112,10 @@ class StocksPy:
         self.window.add(vbox)
         self.window.show_all()
 
+        self.show_info_banner(self.window,
+            ("StockThis uses your network connection to get data.\n"
+            "Be aware of the high costs that your network provider may apply."))
+
     def create_menu(self, window):
         menu = hildon.AppMenu()
         window.set_app_menu(menu)
@@ -132,7 +135,7 @@ class StocksPy:
 
         window = hildon.StackableWindow()
         self.create_menu(window)
-        window.set_title("StockThis - " + inmodel[path][1])
+        window.set_title(inmodel[path][1])
 
         vbox = gtk.VBox()
         toolbar = self.main_toolbar(False, False, None, '', '', False)
@@ -213,7 +216,7 @@ class StocksPy:
 
         win = hildon.StackableWindow()
         self.create_menu(win)
-        win.set_title("StockThis - Quotes View - " + quote[1])
+        win.set_title(quote[1])
 
         vbox = gtk.VBox()
 
@@ -381,7 +384,7 @@ class StocksPy:
                     shares = item[2]
             return shares
         except:
-            logger.exception("Getting shares from symbol")
+            logger.exception("Getting shares from symbol: %s" % symbol)
             return shares
 
     def add_to_portfolio(self, widget, button, symbol, name):
@@ -404,7 +407,7 @@ class StocksPy:
 
             self.show_info_banner(widget, "Added to portfolio")
         except:
-            logger.exception("Adding to portfolio")
+            logger.exception("Adding to portfolio: %s, %s" % (symbol, name))
             self.show_info_banner(widget, "Error adding to portfolio")
 
 
@@ -430,7 +433,7 @@ class StocksPy:
         try:
             data = yt.get_all(symbol)
         except:
-            logger.exception("Getting data from Yahoo")
+            logger.exception("Getting data from Yahoo: %s" % symbol)
             data = {'price': 'N/A', 'change': 'N/A', 'volume':'N/A',
                     '52_week_high': 'N/A', '52_week_low': 'N/A'}
             ltitle.set_markup('<b><big>Failed to get data</big></b>')
@@ -483,7 +486,7 @@ class StocksPy:
     def show_graph_view(self, widget, symbol, name):
         win = hildon.StackableWindow()
         self.create_menu(win)
-        win.set_title("StockThis - Graph View - " + name)
+        win.set_title(name)
 
         vbox = gtk.VBox()
         toolbar = self.main_toolbar(False, True, None, '', '', False)
@@ -598,7 +601,7 @@ class StocksPy:
             self.graph.set_from_pixbuf(pbuf)
             winprogind(win, 0)
         except:
-            logger.exception("Getting graph data")
+            logger.exception("Getting graph data: %s" % url)
             winprogind(win, 0)
             self.graphs_title.set_label('Failed to get data')
             self.graph.destroy()
@@ -694,39 +697,38 @@ class StocksPy:
         if allnames == []:
             for market in marketdata.eunames:
                 for company in market:
-                    if not company in allnames:
-                        allnames.append(company)
+                    allnames.append(company)
 
             for market in marketdata.omnames:
                 for company in market:
-                    if not company in allnames:
-                        allnames.append(company)
+                    allnames.append(company)
 
             for market in marketdata.usnames:
                 for company in market:
-                    if not company in allnames:
-                        allnames.append(company)
+                    allnames.append(company)
 
         if allsymbols == []:
             for market in marketdata.eusymbols:
                 for company in market:
-                    if not company in allsymbols:
-                        allsymbols.append(company)
+                    allsymbols.append(company)
 
             for market in marketdata.omsymbols:
                 for company in market:
-                    if not company in allsymbols:
-                        allsymbols.append(company)
+                    allsymbols.append(company)
 
             for market in marketdata.ussymbols:
                 for company in market:
-                    if not company in allsymbols:
-                        allsymbols.append(company)
+                    allsymbols.append(company)
 
         new_model = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING)
         for i in range(len(allnames)):
             if text.lower() in allnames[i].lower():
                 niter = new_model.append()
+                #print allsymbols[i], allnames[i]
+                #FIXME: repeated companies in the results list
+                #print if allnames[i]
+                #for j in new_model:
+                #    if j[1] == allnames[i]:
                 new_model.set(niter, 0, allsymbols[i], 1, allnames[i])
 
         if len(new_model) == 0:
@@ -745,7 +747,7 @@ class StocksPy:
     def show_search_screen(self, model, text):
         window = hildon.StackableWindow()
         self.create_menu(window)
-        window.set_title("StockThis - Search for " + text)
+        window.set_title("Search for " + text)
 
         vbox = gtk.VBox()
         toolbar = self.main_toolbar(False, False, None, '', '', False)
@@ -780,7 +782,7 @@ class StocksPy:
 
         win = hildon.StackableWindow()
         self.create_menu(win)
-        win.set_title("StockThis - Portfolio")
+        win.set_title("Portfolio")
 
         vbox = gtk.VBox()
 
@@ -935,7 +937,7 @@ class StocksPy:
             price = yt.get_price(symbol)
             return price
         except:
-            logger.exception("Getting price from Yahoo")
+            logger.exception("Getting price from Yahoo: %s" % symbol)
             return "N/A"
 
     def _create_portfolio_model(self, data):
@@ -1065,7 +1067,7 @@ class About:
         elif action == "vote":
             url = "http://maemo.org/downloads/product/stockthis"
 
-        iface.load_url(url)
+        iface.open_new_window(url)
 
     def show_info(self, widget, kind):
         if kind == 'license':