diff --git a/src/EOSConnect/Views/DeviceSettingsView.vala b/src/EOSConnect/Views/DeviceSettingsView.vala index c7ea26c1965f29e1e2abe55f970483343ce2f13a..416f7cb0dd2789a4996f082ef2e94664de5168bc 100644 --- a/src/EOSConnect/Views/DeviceSettingsView.vala +++ b/src/EOSConnect/Views/DeviceSettingsView.vala @@ -82,8 +82,10 @@ namespace EOSConnect.Views { status_switch.notify["active"].connect (() => { if (status_switch.active) { // ClientIface.get_instance ().allow_device.begin (device.id); + device.pair_device (); } else { // ClientIface.get_instance ().disallow_device.begin (device.id); + } }); @@ -97,6 +99,8 @@ namespace EOSConnect.Views { public void update_ui () { if(device.is_paired) { status_switch.active = true; + } else { + status_switch.active = false; } } } diff --git a/src/MConnect/Device.vala b/src/MConnect/Device.vala index 2862b35a697ce88281b605a4e3770c14d510c9e7..b9af4e5c08df88861b1501871fd48d5c2fea1358 100644 --- a/src/MConnect/Device.vala +++ b/src/MConnect/Device.vala @@ -241,6 +241,10 @@ namespace MConnect { } } + public void pair_device () { + pair.begin (); + } + /** * maybe_pair: * @@ -248,8 +252,8 @@ namespace MConnect { */ public void maybe_pair () { if (is_paired == false) { - if (_pair_in_progress == false) - pair.begin (); + //if (_pair_in_progress == false) + //pair.begin (); } else { // We are already paired. handle_pair (true); @@ -369,7 +373,7 @@ namespace MConnect { capability_removed (c); // Remove capability handlers unregister_capability_handler (c); - // update_capabilities_status_available (c, false); + // Update_capabilities_status_available (c, false); } if (host != null && host.to_string () != other_dev.host.to_string ()) { @@ -383,7 +387,7 @@ namespace MConnect { } public void send (Packet pkt) { - // @TODO: queue messages + // TODO: queue messages if (_channel != null) { _channel.send.begin (pkt); } else { diff --git a/src/MConnect/DeviceManager.vala b/src/MConnect/DeviceManager.vala index 5ad292b27de240f3ac44656e9db8d069846fa2f7..4fe537fa863043129a785bf006f96ad67ea96a00 100644 --- a/src/MConnect/DeviceManager.vala +++ b/src/MConnect/DeviceManager.vala @@ -104,7 +104,7 @@ namespace MConnect { if (is_new) { // Make sure that this happens before we update device data so that // all subscribeds of found_new_device() signal have a chance to - // setup eveything they need + // setup eveything they need. this.found_new_device (dev); dev.capability_added.connect (this.device_capability_added_cb); dev.capability_removed.connect (this.device_capability_removed_cb);