diff options
author | Sebastian Reichel <sre@ring0.de> | 2018-07-16 02:25:11 +0200 |
---|---|---|
committer | Sebastian Reichel <sre@ring0.de> | 2018-07-17 12:17:08 +0200 |
commit | 1e9d689bad5fa9a96abbc6d0a2df0f2258b1d1ab (patch) | |
tree | 6e7d31577124856a92b30dabcca81ca7b8e6a73e /src | |
parent | 60e7aea9c4501213f8710b0f14bf3e3ba35e8d7a (diff) | |
download | serial-barcode-scanner-1e9d689bad5fa9a96abbc6d0a2df0f2258b1d1ab.tar.bz2 |
play logout sound
Diffstat (limited to 'src')
-rw-r--r-- | src/scanner-session/scannersession.vala | 14 |
1 files 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; |