settings saved with backup, and bugfixed 6077
authorDaniel Martin Yerga <yerga@ubuntu.(none)>
Sun, 7 Feb 2010 15:49:10 +0000 (16:49 +0100)
committerDaniel Martin Yerga <yerga@ubuntu.(none)>
Sun, 7 Feb 2010 15:49:10 +0000 (16:49 +0100)
changelog
setup.py
stockthis.conf [new file with mode: 0644]
stockthis.py

index b7178e6..16f59ed 100644 (file)
--- a/changelog
+++ b/changelog
@@ -1,3 +1,8 @@
+2010-02-07  Daniel Martin Yerga  <dyerga@gmail.com>
+
+  * Settings are saved with the system backup. MB#6078
+  * It's possible to add to the Portfolio without setting a name. MB#6077
+
 2009-11-18  Daniel Martin Yerga  <dyerga@gmail.com>
 
   * Changed URL to the right maemo.org download page.
index 1530578..1e10f93 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -25,6 +25,7 @@ inst_dbus = ['stockthis.service']
 inst_icon = ['stockthis.png']
 inst_icon_sca = ['pixmaps/stockthis.png']
 sh_bin = ['stockthis']
+backup_conf  = ['stockthis.conf']
 
 data_files = [
   ('share/applications/hildon', inst_desktop),
@@ -33,6 +34,7 @@ data_files = [
   ('share/icons/hicolor/26x26/hildon/',   inst_icon),
   ('share/icons/hicolor/scalable/hildon/',   inst_icon_sca),
   ('share/dbus-1/services',   inst_dbus),
+  ('/etc/osso-backup/applications/',   backup_conf),
 ]
 
 
diff --git a/stockthis.conf b/stockthis.conf
new file mode 100644 (file)
index 0000000..86011fa
--- /dev/null
@@ -0,0 +1,6 @@
+<backup-configuration>
+  <locations>
+       <location type="dir" category="settings">/home/user/.stockthis</location>
+       <location type="file" category="settings" auto="true">/etc/osso-backup/applications/stockthis.conf</location>
+ </locations>
+</backup-configuration>
index 31f6a4c..8775a57 100644 (file)
@@ -853,6 +853,10 @@ class StocksPy:
         name = entry1.get_text()
         shares = button.get_value()
 
+        if name == '' or symbol == '':
+            self.show_info_banner(widget, "Must add the name and symbol")
+            return
+
         self.add_to_portfolio(widget, button, symbol, name)
         dlg.destroy()