[billreminder] Handle deleting bills.



commit fa046801301f4c9b494e08624eb6a1c2775f1e59
Author: Og B. Maciel <ogmaciel gnome org>
Date:   Sat Nov 14 12:50:04 2009 -0500

    Handle deleting bills.

 src/gui/maindialog.py |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/gui/maindialog.py b/src/gui/maindialog.py
index 93866f9..7d08c19 100644
--- a/src/gui/maindialog.py
+++ b/src/gui/maindialog.py
@@ -410,14 +410,12 @@ class MainDialog:
 
     def remove_bill(self):
         try:
-            session = DAL().Session()
-            session.delete(self.currentrecord)
-            session.commit()
+            self.actions.delete(self.currentrecord)
             self.list.remove()
             self.update_statusbar()
             self.reloadTimeline()
         except Exception, e:
-            print str(e)
+            print "Failed to remove selected bill with error: %s" % str(e)
 
     def toggle_bill_paid(self):
         try:



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