Comment 22 for bug 1126108

Cas (calumlind) wrote :

@charlemagne86 The patch in #13 is for an older version of indicator-bluetooth, the latest code is quite different so the patch will not work.

I have been looking in the code and the newly added 'supported' option would work and thought I would update the ticket to show that it is possible with simple changes.

=== modified file 'src/bluez.vala'
   void on_default_adapter_changed (string? object_path)
     clear_adapter ();
+ supported = object_path != null;

=== modified file 'src/desktop.vala'
- visible = bluetooth.enabled && settings.get_boolean("visible");
+ visible = (bluetooth.enabled || bluetooth.supported) && settings.get_boolean("visible");

However this uncovers a bug whereby turning bluetooth on/off from indicator or settings works only once then fails on further attempts and stays off with only a restart of the bluetooth service fixing the issue.

The requirement that hiding the indicator when no adaptor is physically available is also possible but need to do a bit more testing as the above issue confused things.