diff --git a/src/preferences/bluetooth/BluetoothSettingsView.cpp b/src/preferences/bluetooth/BluetoothSettingsView.cpp index 84007b357a..a2feb63697 100644 --- a/src/preferences/bluetooth/BluetoothSettingsView.cpp +++ b/src/preferences/bluetooth/BluetoothSettingsView.cpp @@ -126,12 +126,14 @@ BluetoothSettingsView::MessageReceived(BMessage *msg) if (msg->FindPointer("LocalDevice", (void**) &lDevice) == B_OK) { // Device integrity should be rechecked fExtDeviceView->SetLocalDevice(lDevice); + fExtDeviceView->SetEnabled(true); ActiveLocalDevice = lDevice; } } break; case kMsgRefresh: _BuildLocalDevicesMenu(); + fLocalDevicesMenu->SetTargetForItems(this); break; default: BView::MessageReceived(msg); diff --git a/src/preferences/bluetooth/ExtendedLocalDeviceView.cpp b/src/preferences/bluetooth/ExtendedLocalDeviceView.cpp index 1e235327f5..91f0ea1a17 100644 --- a/src/preferences/bluetooth/ExtendedLocalDeviceView.cpp +++ b/src/preferences/bluetooth/ExtendedLocalDeviceView.cpp @@ -31,7 +31,8 @@ ExtendedLocalDeviceView::ExtendedLocalDeviceView(BRect frame, LocalDevice* bDevi fDiscoverable = new BCheckBox(iDontCare, "Discoverable","Discoverable", new BMessage(SET_DISCOVERABLE)); fVisible = new BCheckBox(iDontCare, "Visible", "Show Name", new BMessage(SET_VISIBLE)); - + fDiscoverable->SetEnabled(false); + fVisible->SetEnabled(false); AddChild(BGroupLayoutBuilder(B_VERTICAL, 0) .Add(fDeviceView) @@ -103,8 +104,8 @@ ExtendedLocalDeviceView::MessageReceived(BMessage *msg) if (fVisible->Value()) fScanMode |= 2; - - fDevice->SetDiscoverable(fScanMode); + if (fDevice != NULL) + fDevice->SetDiscoverable(fScanMode); break; @@ -118,5 +119,5 @@ ExtendedLocalDeviceView::MessageReceived(BMessage *msg) void ExtendedLocalDeviceView::SetEnabled(bool value) { - + fDiscoverable->SetEnabled(value); }