summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Reichel <sre@ring0.de>2012-08-07 00:59:17 +0200
committerSebastian Reichel <sre@ring0.de>2012-08-07 00:59:17 +0200
commitce0fd26c93b7341c54977bc677e5905c1a1acf36 (patch)
tree309fff36edc9f3733021330769e0cedbbc5507d2
parent30339bfed648cb9bdedf899274940720dfe31e4c (diff)
downloadserial-barcode-scanner-ce0fd26c93b7341c54977bc677e5905c1a1acf36.tar.bz2
reset values before hiding the window
-rw-r--r--ui.vala7
1 files changed, 6 insertions, 1 deletions
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();
+ }
});
}