diff options
author | Aylur <[email protected]> | 2024-08-08 23:20:33 +0200 |
---|---|---|
committer | Aylur <[email protected]> | 2024-08-08 23:20:33 +0200 |
commit | 14d2615cd0ffe651f479ffeb22815b92eb455a34 (patch) | |
tree | a4d837a5cf277da80310abac1de60bfef8b44f91 | |
parent | b6ca176cb8a2d23a625cb293681f870c4fc8aae1 (diff) |
feat: device.connecting
-rw-r--r-- | src/device.vala | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/device.vala b/src/device.vala index bfcbdec..fbcdd1e 100644 --- a/src/device.vala +++ b/src/device.vala @@ -52,6 +52,7 @@ public class Device : Object { public string name { owned get { return proxy.name; } } public uint16 appearance { get { return proxy.appearance; } } public uint32 class { get { return proxy.class; } } + public bool connecting { get; private set; } public bool blocked { get { return proxy.blocked; } @@ -73,7 +74,14 @@ public class Device : Object { } public async void connect_device() { - try { yield proxy.connect(); } catch (Error err) { critical(err.message); } + try { + connecting = true; + yield proxy.connect(); + } catch (Error err) { + critical(err.message); + } finally { + connecting = false; + } } public async void disconnect_device() { |