From ce0fd26c93b7341c54977bc677e5905c1a1acf36 Mon Sep 17 00:00:00 2001 From: Sebastian Reichel Date: Tue, 7 Aug 2012 00:59:17 +0200 Subject: reset values before hiding the window --- ui.vala | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ui.vala b/ui.vala index 9e235f3..e3a21aa 100644 --- a/ui.vala +++ b/ui.vala @@ -19,6 +19,8 @@ public void init_restock_dialog() { var ok = builder.get_object("button-restock-add") as Gtk.Button; cancel.clicked.connect(() => { + spinner.value = 0.0; + box.active = -1; window.hide(); }); @@ -30,8 +32,11 @@ public void init_restock_dialog() { int64 timestamp = (new DateTime.now_utc()).to_unix(); stdout.printf("[%lld] restock: %lld - %d\n", timestamp, product, amount); - if(db.restock(product, amount)) + if(db.restock(product, amount)) { + spinner.value = 0.0; + box.active = -1; window.hide(); + } }); } -- cgit v1.2.3