From 1e9d689bad5fa9a96abbc6d0a2df0f2258b1d1ab Mon Sep 17 00:00:00 2001 From: Sebastian Reichel Date: Mon, 16 Jul 2018 02:25:11 +0200 Subject: play logout sound --- src/scanner-session/scannersession.vala | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/scanner-session/scannersession.vala b/src/scanner-session/scannersession.vala index 494ecbd..796cf93 100644 --- a/src/scanner-session/scannersession.vala +++ b/src/scanner-session/scannersession.vala @@ -152,13 +152,13 @@ public class ScannerSessionImplementation { case ScannerSessionCodeType.GUEST: if(login(0)) { scannerResult.type = MessageType.INFO; - scannerResult.message = _("Login as GUEST"); + scannerResult.message = _("Login as Guest"); scannerResult.audioType = AudioType.LOGIN; shoppingCard = {}; state = ScannerSessionState.USER; } else { scannerResult.type = MessageType.ERROR; - scannerResult.message = _("Login failed as GUEST"); + scannerResult.message = _("Login failed (Guest)"); scannerResult.audioType = AudioType.ERROR; state = ScannerSessionState.READY; } @@ -192,7 +192,7 @@ public class ScannerSessionImplementation { var pname = p.name; scannerResult.type = MessageType.INFO; - scannerResult.message = _("article info: %s (Member: %s €, Guest: %s €").printf(@"$pname", @"$mprice", @"$gprice"); + scannerResult.message = _("Article info: %s (Member: %s €, Guest: %s €").printf(@"$pname", @"$mprice", @"$gprice"); scannerResult.audioType = AudioType.ERROR; state = ScannerSessionState.READY; return scannerResult; @@ -243,7 +243,7 @@ public class ScannerSessionImplementation { } scannerResult.type = MessageType.INFO; - scannerResult.message = _("article added to shopping card: %s (%s €)").printf(@"$(p.name)", @"$price"); + scannerResult.message = _("Article added to shopping card: %s (%s €)").printf(@"$(p.name)", @"$price"); scannerResult.audioType = AudioType.PURCHASE; state = ScannerSessionState.USER; break; @@ -252,7 +252,7 @@ public class ScannerSessionImplementation { var removedProduct = shoppingCard[shoppingCard.length-1]; shoppingCard = shoppingCard[0:shoppingCard.length-1]; scannerResult.type = MessageType.INFO; - scannerResult.message = _("removed last Item from Shopping Cart: %s").printf(@"$(removedProduct.name)"); + scannerResult.message = _("Removed last Item from Shopping Cart: %s").printf(@"$(removedProduct.name)"); scannerResult.audioType = AudioType.INFO; } else { scannerResult.type = MessageType.INFO; @@ -331,8 +331,8 @@ public class ScannerSessionImplementation { } private ScannerResult logout() throws DatabaseError, DBusError, IOError { - ScannerResult scannerResult = ScannerResult(); - scannerResult = buyShoppingCard(); + ScannerResult scannerResult = buyShoppingCard(); + scannerResult.audioType = AudioType.LOGOUT; logged_in = false; state = ScannerSessionState.READY; return scannerResult; -- cgit v1.2.3