diff options
author | Sebastian Reichel <sre@ring0.de> | 2012-08-07 00:59:17 +0200 |
---|---|---|
committer | Sebastian Reichel <sre@ring0.de> | 2012-08-07 00:59:17 +0200 |
commit | ce0fd26c93b7341c54977bc677e5905c1a1acf36 (patch) | |
tree | 309fff36edc9f3733021330769e0cedbbc5507d2 | |
parent | 30339bfed648cb9bdedf899274940720dfe31e4c (diff) | |
download | serial-barcode-scanner-ce0fd26c93b7341c54977bc677e5905c1a1acf36.tar.bz2 |
reset values before hiding the window
-rw-r--r-- | ui.vala | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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(); + } }); } |