From addf64d24d8311d6dc473a63bb498fe714070092 Mon Sep 17 00:00:00 2001 From: Maciek Borzecki Date: Mon, 19 Jan 2015 21:16:45 +0100 Subject: [PATCH] devicemanager: print message that device got disconnected --- src/devicemanager.vala | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/devicemanager.vala b/src/devicemanager.vala index 098117b..04335e5 100644 --- a/src/devicemanager.vala +++ b/src/devicemanager.vala @@ -38,6 +38,7 @@ class DeviceManager : GLib.Object } string unique = dev.to_unique_string(); + debug("device key: %s", unique); if (this.devices.has_key(unique) == false) { debug("adding new device with key: %s", unique); this.devices.@set(unique, dev); @@ -45,8 +46,13 @@ class DeviceManager : GLib.Object dev.paired.connect((d, p) => { device_paired(d, p); }); + + dev.disconnected.connect((d) => { + device_disconnected(d); + }); dev.activate(); } else { + debug("activate from device"); var known_dev = this.devices.@get(unique); known_dev.activate_from_device(dev); } @@ -67,4 +73,8 @@ class DeviceManager : GLib.Object } } + private void device_disconnected(Device dev) { + debug("device %s got disconnected", dev.to_string()); + } + } \ No newline at end of file