Show local version information, update about box credits
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29642 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -5,6 +5,9 @@
|
||||
#include "BluetoothDeviceView.h"
|
||||
#include <bluetooth/bdaddrUtils.h>
|
||||
|
||||
#include <bluetooth/LocalDevice.h>
|
||||
#include <bluetooth/HCI/btHCI_command.h>
|
||||
|
||||
|
||||
#include <Bitmap.h>
|
||||
#include <GroupLayoutBuilder.h>
|
||||
@@ -19,18 +22,22 @@ BluetoothDeviceView::BluetoothDeviceView(BRect frame, BluetoothDevice* bDevice,
|
||||
{
|
||||
SetViewColor(B_TRANSPARENT_COLOR);
|
||||
SetLowColor(0,0,0);
|
||||
BRect iDontCare(0,0,0,0);
|
||||
//BRect iDontCare(0,0,0,0);
|
||||
|
||||
SetLayout(new BGroupLayout(B_VERTICAL));
|
||||
|
||||
fName = new BStringView(iDontCare, "name", "");
|
||||
fName = new BStringView("name", "");
|
||||
fName->SetFont(be_bold_font);
|
||||
|
||||
fBdaddr = new BStringView(iDontCare, "bdaddr", bdaddrUtils::ToString(bdaddrUtils::NullAddress()));
|
||||
fBdaddr = new BStringView("bdaddr", bdaddrUtils::ToString(bdaddrUtils::NullAddress()));
|
||||
|
||||
fClassService = new BStringView(iDontCare, "ServiceClass", "Service Classes: ");
|
||||
fClassService = new BStringView("ServiceClass", "Service Classes: ");
|
||||
|
||||
fClass = new BStringView(iDontCare, "class", "- / -");
|
||||
fClass = new BStringView("class", "- / -");
|
||||
|
||||
fHCIVersionProperties = new BStringView("version", "");
|
||||
fLMPVersionProperties = new BStringView("lmp", "");
|
||||
fManufacturerProperties = new BStringView("manufacturer", "");
|
||||
|
||||
fIcon = new BitmapView(new BBitmap(BRect(0, 0, 64 - 1, 64 - 1), B_RGBA32));
|
||||
|
||||
@@ -49,7 +56,12 @@ BluetoothDeviceView::BluetoothDeviceView(BRect frame, BluetoothDevice* bDevice,
|
||||
.Add(fClass)
|
||||
.AddGlue()
|
||||
.Add(fClassService)
|
||||
|
||||
.AddGlue()
|
||||
.Add(fHCIVersionProperties)
|
||||
.AddGlue()
|
||||
.Add(fLMPVersionProperties)
|
||||
.AddGlue()
|
||||
.Add(fManufacturerProperties)
|
||||
.SetInsets(5, 25, 25, 25)
|
||||
)
|
||||
.Add(BSpaceLayoutItem::CreateHorizontalStrut(10)
|
||||
@@ -69,7 +81,7 @@ void
|
||||
BluetoothDeviceView::SetBluetoothDevice(BluetoothDevice* bDevice)
|
||||
{
|
||||
if (bDevice != NULL) {
|
||||
|
||||
|
||||
SetName(bDevice->GetFriendlyName().String());
|
||||
|
||||
fName->SetText(bDevice->GetFriendlyName().String());
|
||||
@@ -83,7 +95,31 @@ BluetoothDeviceView::SetBluetoothDevice(BluetoothDevice* bDevice)
|
||||
bDevice->GetDeviceClass().GetMajorDeviceClass(str);
|
||||
str << " / ";
|
||||
bDevice->GetDeviceClass().GetMinorDeviceClass(str);
|
||||
fClass->SetText(str.String());
|
||||
fClass->SetText(str.String());
|
||||
|
||||
|
||||
uint32 value;
|
||||
|
||||
str = "";
|
||||
if (bDevice->GetProperty("hci_version", &value) == B_OK)
|
||||
str << "HCI ver: " << GetHciVersion(value);
|
||||
if (bDevice->GetProperty("hci_revision", &value) == B_OK)
|
||||
str << " HCI rev: " << value ;
|
||||
|
||||
fHCIVersionProperties->SetText(str.String());
|
||||
|
||||
str = "";
|
||||
if (bDevice->GetProperty("lmp_version", &value) == B_OK)
|
||||
str << "LMP ver: " << GetLmpVersion(value);
|
||||
if (bDevice->GetProperty("lmp_subversion", &value) == B_OK)
|
||||
str << " LMP subver: " << value;
|
||||
fLMPVersionProperties->SetText(str.String());
|
||||
|
||||
str = "";
|
||||
if (bDevice->GetProperty("manufacturer", &value) == B_OK)
|
||||
str << "Manufacturer: " << GetManufacturer(value);
|
||||
fManufacturerProperties->SetText(str.String());
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -38,6 +38,12 @@ protected:
|
||||
BStringView* fBdaddr;
|
||||
BStringView* fClassService;
|
||||
BStringView* fClass;
|
||||
|
||||
BStringView* fHCIVersionProperties;
|
||||
BStringView* fLMPVersionProperties;
|
||||
BStringView* fManufacturerProperties;
|
||||
|
||||
BStringView* fBuffersProperties;
|
||||
|
||||
BitmapView* fIcon;
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ BluetoothApplication::AboutRequested()
|
||||
"Shipping/donating hardware:\n"
|
||||
" - Henry Jair Abril Florez(el Colombian)\n"
|
||||
" & Stefanie Bartolich\n"
|
||||
" - Edwin Erik Amsler\n"
|
||||
" - Dennis d'Entremont\n"
|
||||
" - Luroh\n"
|
||||
" - Pieter Panman\n\n"
|
||||
@@ -44,10 +45,10 @@ BluetoothApplication::AboutRequested()
|
||||
" - Greg G, David F, Richard S, Martin W:\n\n"
|
||||
"With patches:\n"
|
||||
" - Fredrik Ekdahl\n"
|
||||
" - Raynald Lesieur\n"
|
||||
" - Andreas Färber\n\n"
|
||||
"Testing:\n"
|
||||
" - Petter H. Juliussen\n"
|
||||
" - Raynald Lesieur\n"
|
||||
" - Adrien Destugues\n"
|
||||
" - Jörg Meyer\n\n"
|
||||
"Who gave me all the knowledge:\n"
|
||||
|
||||
Reference in New Issue
Block a user