Merge lp:~robert-ancell/indicator-bluetooth/dont-hide-on-rfkill into lp:indicator-bluetooth/13.10

Proposed by Robert Ancell on 2013-04-02
Status: Work in progress
Proposed branch: lp:~robert-ancell/indicator-bluetooth/dont-hide-on-rfkill
Merge into: lp:indicator-bluetooth/13.10
Diff against target: 17 lines (+6/-1)
1 file modified
src/indicator-bluetooth-service.vala (+6/-1)
To merge this branch: bzr merge lp:~robert-ancell/indicator-bluetooth/dont-hide-on-rfkill
Reviewer Review Type Date Requested Status
Sebastien Bacher 2013-04-03 Disapprove on 2013-04-10
PS Jenkins bot (community) continuous-integration Approve on 2013-04-02
Indicator Applet Developers 2013-04-02 Pending
Review via email: mp+156455@code.launchpad.net

Commit message

Show the bluetooth indicator if bluetooth is disabled - assume there are devices present

To post a comment you must log in.
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Robert Ancell (robert-ancell) wrote :

Seb said he'd confirm that it works on hardware without Bluetooth support.

Martin Pitt (pitti) wrote :

Works great here with real bluetooth device and both soft and hard rfkill, thank you!

Sebastien Bacher (seb128) wrote :

Tested in a virtualbox image (where there is no bluetooth device), that change makes indicator-bluetooth be displayed (unactive but still having an indicator) where it was not before

On the same image "hcitool dev" lists nothing and the control center says "no bluetooth adapters found"

@pitti: what is g-c-c saying in your case when you desactivate bluetooth? does it say "no bluetooth adapters found" or something else?

Do we have a reliable way to tell if there is no hardware support/device or if the device is present but desactivated?

review: Disapprove

Unmerged revisions

51. By Robert Ancell on 2013-04-01

Show the bluetooth indicator if bluetooth is disabled - assume there are devices present

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/indicator-bluetooth-service.vala'
2--- src/indicator-bluetooth-service.vala 2013-02-07 22:57:39 +0000
3+++ src/indicator-bluetooth-service.vala 2013-04-02 03:39:22 +0000
4@@ -186,7 +186,12 @@
5
6 private void update_visible ()
7 {
8- bluetooth_service._visible = client.adapter_model.iter_n_children (null) > 0 && settings.get_boolean ("visible");
9+ /* Show if:
10+ * - There are bluetooth devices
11+ * - Bluetooth is disabled (for some hardware this means there are no devices reported but we should assume there are if it is disabled)
12+ * - It has been enabled in settings
13+ */
14+ bluetooth_service._visible = (client.adapter_model.iter_n_children (null) > 0 || killswitch.state != GnomeBluetooth.KillswitchState.UNBLOCKED) && settings.get_boolean ("visible");
15 var builder = new VariantBuilder (VariantType.ARRAY);
16 builder.add ("{sv}", "Visible", new Variant.boolean (bluetooth_service._visible));
17 try

Subscribers

People subscribed via source and target branches