summaryrefslogtreecommitdiffstats
path: root/src/curses-ui/main.vala
diff options
context:
space:
mode:
Diffstat (limited to 'src/curses-ui/main.vala')
-rw-r--r--src/curses-ui/main.vala17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/curses-ui/main.vala b/src/curses-ui/main.vala
index 47be40a..7c2e762 100644
--- a/src/curses-ui/main.vala
+++ b/src/curses-ui/main.vala
@@ -23,6 +23,8 @@ private static void play(string file) {
audio.play_system(file);
} catch(IOError e) {
ui.log(MessageType.WARNING, "could not play audio: %s".printf(e.message));
+ } catch(DBusError e) {
+ ui.log(MessageType.WARNING, "could not play audio: %s".printf(e.message));
}
}
@@ -43,8 +45,8 @@ public static int main(string[] args) {
loop = new MainLoop();
/* handle unix signals */
- Unix.signal_add(Posix.SIGTERM, handle_signals);
- Unix.signal_add(Posix.SIGINT, handle_signals);
+ Unix.signal_add(Posix.Signal.TERM, handle_signals);
+ Unix.signal_add(Posix.Signal.INT, handle_signals);
try {
audio = Bus.get_proxy_sync(BusType.SYSTEM, "io.mainframe.shopsystem.AudioPlayer", "/io/mainframe/shopsystem/audio");
@@ -62,16 +64,7 @@ public static int main(string[] args) {
scanner.msg.connect(msg_handler);
scanner.msg_overlay.connect(msg_overlay_handler);
- /* get configuration */
- Config config = Bus.get_proxy_sync(BusType.SYSTEM, "io.mainframe.shopsystem.Config", "/io/mainframe/shopsystem/config");
- var shopname = "--SHOPNAME--";
- try {
- shopname = config.get_string("GENERAL", "longname");
- } catch(KeyFileError e) {
- shopname = "Missing in Config";
- }
-
- ui.log(MessageType.INFO, "KtT Shop System has been started");
+ ui.log(MessageType.INFO, "Shop System has been started");
play("startup.ogg");
/* run mainloop */