Bluetooth Pref: Updating view of incomming connection when Paring

This is not my code but from ticket #9265
* Made a picture of how it looks, old left andnew right. https://imagebin.ca/v/5wIe6TIMzw4C
* Think we have a bug somewhere and don't store the name of the Bluetooth device (shown i the image).
* I have made som small changes but other than that it's the same code as in the ticket
* Ran the src/tools/checkstyle/checkstyle.py to get som style stuff, probably missed some anyway.

Change-Id: Ifeb75c8ad890f541e100cdcf78b394675a48ada9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3825
Reviewed-by: Fredrik Modéen <[email protected]>
This commit is contained in:
Fredrik Modéen
2021-03-30 17:25:13 +00:00
parent 560961ee2a
commit 16196fd3b7
9 changed files with 371 additions and 141 deletions
+23 -10
View File
@@ -1,9 +1,14 @@
/*
* Copyright 2007-2008 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com
* All rights reserved. Distributed under the terms of the MIT License.
*/
#ifndef _PINCODE_REQUEST_WINDOW_H
#define _PINCODE_REQUEST_WINDOW_H
* Copyright 2021, Haiku, Inc.
* Distributed under the terms of the MIT License.
*
* Authors:
* Oliver Ruiz Dorantes <[email protected]>
* Tri-Edge AI <[email protected]>
*/
#ifndef _PINCODE_REQUEST_WINDOW_H_
#define _PINCODE_REQUEST_WINDOW_H_
#include <View.h>
@@ -12,20 +17,21 @@
#include <bluetooth/bluetooth.h>
#include <bluetooth/HCI/btHCI.h>
#include <BluetoothIconView.h>
class BStringView;
class BButton;
class BTextControl;
namespace Bluetooth {
namespace Bluetooth {
class RemoteDevice;
class PincodeWindow : public BWindow
{
class PincodeWindow : public BWindow {
public:
PincodeWindow(bdaddr_t address, hci_id hid);
PincodeWindow(RemoteDevice* rDevice);
virtual void MessageReceived(BMessage *msg);
virtual void MessageReceived(BMessage* msg);
virtual bool QuitRequested();
void SetBDaddr(BString address);
@@ -39,6 +45,13 @@ private:
BButton* fAcceptButton;
BButton* fCancelButton;
BTextControl* fPincodeText;
BluetoothIconView* fIcon;
BStringView* fMessage2;
BStringView* fDeviceLabel;
BStringView* fDeviceText;
BStringView* fAddressLabel;
BStringView* fAddressText;
};
}
@@ -47,4 +60,4 @@ private:
using Bluetooth::PincodeWindow;
#endif
#endif
#endif /* _PINCODE_REQUEST_WINDOW_H_ */