- Fix gcc4 build(Monni)
- Remove Items added to Remote List from inquiry list, this fixes elements being shared among more than 1 list. Both lists behave better now. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29369 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -27,7 +27,7 @@ DeviceListItem::DeviceListItem(BluetoothDevice* bDevice)
|
||||
}
|
||||
|
||||
|
||||
DeviceListItem::DeviceListItem(bdaddr_t bdaddr, DeviceClass dClass, int32 rssi = 0)
|
||||
DeviceListItem::DeviceListItem(bdaddr_t bdaddr, DeviceClass dClass, int32 rssi)
|
||||
: BListItem(),
|
||||
fDevice(NULL),
|
||||
fAddress(bdaddr),
|
||||
|
||||
@@ -19,7 +19,7 @@ class DeviceListItem : public BListItem
|
||||
{
|
||||
public:
|
||||
DeviceListItem(BluetoothDevice* bDevice);
|
||||
DeviceListItem(bdaddr_t bdaddr, DeviceClass dClass, int32 rssi = 0);
|
||||
DeviceListItem(bdaddr_t bdaddr, DeviceClass dClass, int32 rssi = 0);
|
||||
|
||||
~DeviceListItem();
|
||||
|
||||
|
||||
@@ -184,8 +184,8 @@ InquiryPanel::MessageReceived(BMessage *message)
|
||||
{
|
||||
message->PrintToStream();
|
||||
int32 index = fRemoteList->CurrentSelection(0);
|
||||
DeviceListItem* item = (DeviceListItem*) fRemoteList->ItemAt(index);
|
||||
|
||||
DeviceListItem* item = (DeviceListItem*) fRemoteList->RemoveItem(index);;
|
||||
|
||||
BMessage message(kMsgAddToRemoteList);
|
||||
message.AddPointer("device", item);
|
||||
|
||||
|
||||
@@ -118,6 +118,7 @@ RemoteDevicesView::MessageReceived(BMessage *msg)
|
||||
BListItem* device;
|
||||
msg->FindPointer("device", (void**)&device);
|
||||
fDeviceList->AddItem(device);
|
||||
fDeviceList->Invalidate();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user