diff options
author | Kevin <[email protected]> | 2024-10-16 00:49:16 -0300 |
---|---|---|
committer | Kevin <[email protected]> | 2024-10-16 00:49:16 -0300 |
commit | 2b1e8501b46056b79d97e90c6ec94e3ad36d0ab2 (patch) | |
tree | 6486e98bd1ba523b1aeb4bd2566d1ff6e5c41798 /examples/vala/simple-bar/app.in.vala | |
parent | 03f2c4706faba7dac5aee71b10255eac218cbeec (diff) | |
parent | 236487001ab2a6c9c8e87e5db0ced9e5ab3ed791 (diff) |
Merge branch 'adapt-upstream-changes'
Diffstat (limited to 'examples/vala/simple-bar/app.in.vala')
-rw-r--r-- | examples/vala/simple-bar/app.in.vala | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/examples/vala/simple-bar/app.in.vala b/examples/vala/simple-bar/app.in.vala index aece979..b04a1fa 100644 --- a/examples/vala/simple-bar/app.in.vala +++ b/examples/vala/simple-bar/app.in.vala @@ -3,7 +3,7 @@ class App : Astal.Application { public override void request (string msg, SocketConnection conn) { print(@"$msg\n"); - Astal.write_sock.begin(conn, "hello"); + AstalIO.write_sock.begin(conn, "ok"); } public override void activate () { @@ -14,16 +14,17 @@ class App : Astal.Application { } public static void main(string[] args) { - var instance_name = "simple-bar"; + var instance_name = "vala"; App.instance = new App() { instance_name = instance_name }; - if (App.instance.acquire_socket()) { + try { + App.instance.acquire_socket(); App.instance.run(null); - } else { - print(Astal.Application.send_message(instance_name, string.joinv(" ", args))); + } catch (Error err) { + print(AstalIO.send_message(instance_name, string.joinv(" ", args))); } } } |