Fixes #7156 "Bluetooth Preflet localization fix" by Jorma Karvonen.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40477 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -149,21 +149,22 @@ BluetoothDeviceView::SetBluetoothDevice(BluetoothDevice* bDevice)
|
||||
|
||||
string = "";
|
||||
if (bDevice->GetProperty("manufacturer", &value) == B_OK)
|
||||
string << "Manufacturer: " << BluetoothManufacturer(value);
|
||||
string << B_TRANSLATE("Manufacturer: ")
|
||||
<< BluetoothManufacturer(value);
|
||||
fManufacturerProperties->SetText(string.String());
|
||||
|
||||
string = "";
|
||||
if (bDevice->GetProperty("acl_mtu", &value) == B_OK)
|
||||
string << "ACL mtu: " << value;
|
||||
if (bDevice->GetProperty("acl_max_pkt", &value) == B_OK)
|
||||
string << " packets: " << value;
|
||||
string << B_TRANSLATE(" packets: ") << value;
|
||||
fACLBuffersProperties->SetText(string.String());
|
||||
|
||||
string = "";
|
||||
if (bDevice->GetProperty("sco_mtu", &value) == B_OK)
|
||||
string << "SCO mtu: " << value;
|
||||
if (bDevice->GetProperty("sco_max_pkt", &value) == B_OK)
|
||||
string << " packets: " << value;
|
||||
string << B_TRANSLATE(" packets: ") << value;
|
||||
fSCOBuffersProperties->SetText(string.String());
|
||||
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
#include <Alert.h>
|
||||
#include <Catalog.h>
|
||||
#include <Locale.h>
|
||||
#include <MessageRunner.h>
|
||||
#include <Roster.h>
|
||||
|
||||
@@ -30,9 +29,11 @@ BluetoothApplication::ReadyToRun()
|
||||
if (!be_roster->IsRunning(BLUETOOTH_SIGNATURE)) {
|
||||
|
||||
int32 choice = (new BAlert("bluetooth_server not running",
|
||||
"bluetooth_server has not been found running on the system."
|
||||
"Should be started, or stay offline", "Work offline",
|
||||
"Quit", "Start please", B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go();
|
||||
B_TRANSLATE("bluetooth_server has not been found running on the "
|
||||
"system. Should be started, or stay offline"),
|
||||
B_TRANSLATE("Work offline"), B_TRANSLATE("Quit"),
|
||||
B_TRANSLATE("Start please"), B_WIDTH_AS_USUAL,
|
||||
B_WARNING_ALERT))->Go();
|
||||
|
||||
|
||||
switch (choice) {
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
#include <Catalog.h>
|
||||
#include <GridLayoutBuilder.h>
|
||||
#include <GroupLayoutBuilder.h>
|
||||
#include <Locale.h>
|
||||
#include <MenuField.h>
|
||||
#include <MenuItem.h>
|
||||
#include <PopUpMenu.h>
|
||||
@@ -156,35 +155,40 @@ BluetoothSettingsView::MessageReceived(BMessage* message)
|
||||
case kMsgSetDeviceClassDesktop:
|
||||
{
|
||||
devClass.SetRecord(1, 1, 0x72);
|
||||
ActiveLocalDevice->SetDeviceClass(devClass);
|
||||
if (ActiveLocalDevice != NULL)
|
||||
ActiveLocalDevice->SetDeviceClass(devClass);
|
||||
break;
|
||||
}
|
||||
|
||||
case kMsgSetDeviceClassServer:
|
||||
{
|
||||
devClass.SetRecord(1, 2, 0x72);
|
||||
ActiveLocalDevice->SetDeviceClass(devClass);
|
||||
if (ActiveLocalDevice != NULL)
|
||||
ActiveLocalDevice->SetDeviceClass(devClass);
|
||||
break;
|
||||
}
|
||||
|
||||
case kMsgSetDeviceClassLaptop:
|
||||
{
|
||||
devClass.SetRecord(1, 3, 0x72);
|
||||
ActiveLocalDevice->SetDeviceClass(devClass);
|
||||
if (ActiveLocalDevice != NULL)
|
||||
ActiveLocalDevice->SetDeviceClass(devClass);
|
||||
break;
|
||||
}
|
||||
|
||||
case kMsgSetDeviceClassHandheld:
|
||||
{
|
||||
devClass.SetRecord(1, 4, 0x72);
|
||||
ActiveLocalDevice->SetDeviceClass(devClass);
|
||||
if (ActiveLocalDevice != NULL)
|
||||
ActiveLocalDevice->SetDeviceClass(devClass);
|
||||
break;
|
||||
}
|
||||
|
||||
case kMsgSetDeviceClassSmartPhone:
|
||||
{
|
||||
devClass.SetRecord(2, 3, 0x72);
|
||||
ActiveLocalDevice->SetDeviceClass(devClass);
|
||||
if (ActiveLocalDevice != NULL)
|
||||
ActiveLocalDevice->SetDeviceClass(devClass);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#include <Button.h>
|
||||
#include <Catalog.h>
|
||||
#include <GroupLayoutBuilder.h>
|
||||
#include <Locale.h>
|
||||
#include <Messenger.h>
|
||||
#include <SpaceLayoutItem.h>
|
||||
#include <TabView.h>
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
#include <Catalog.h>
|
||||
#include <CheckBox.h>
|
||||
#include <GroupLayoutBuilder.h>
|
||||
#include <Locale.h>
|
||||
#include <SpaceLayoutItem.h>
|
||||
#include <StringView.h>
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
#include <Button.h>
|
||||
#include <Catalog.h>
|
||||
#include <GroupLayoutBuilder.h>
|
||||
#include <Locale.h>
|
||||
#include <ListView.h>
|
||||
#include <ListItem.h>
|
||||
#include <MessageRunner.h>
|
||||
@@ -94,7 +93,7 @@ private:
|
||||
|
||||
InquiryPanel::InquiryPanel(BRect frame, LocalDevice* lDevice)
|
||||
:
|
||||
BWindow(frame, "Bluetooth", B_FLOATING_WINDOW,
|
||||
BWindow(frame, B_TRANSLATE("Bluetooth"), B_FLOATING_WINDOW,
|
||||
B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS, B_ALL_WORKSPACES ),
|
||||
fMessenger(this),
|
||||
fScanning(false),
|
||||
@@ -252,13 +251,15 @@ InquiryPanel::MessageReceived(BMessage* message)
|
||||
case kMsgSecond:
|
||||
if (fScanning && scanningTime < timer) {
|
||||
// TODO time formatting could use Locale Kit
|
||||
BString elapsedTime = B_TRANSLATE("Remaining ");
|
||||
|
||||
// TODO should not be needed if SetMaxValue works...
|
||||
fScanProgress->SetTo(scanningTime * 100 / timer);
|
||||
BString elapsedTime = B_TRANSLATE("Remaining %1 seconds");
|
||||
|
||||
elapsedTime << (int)(timer - scanningTime) <<
|
||||
B_TRANSLATE(" seconds");
|
||||
BString seconds("");
|
||||
seconds << (int)(timer - scanningTime);
|
||||
|
||||
elapsedTime.ReplaceFirst("%1", seconds.String());
|
||||
fScanProgress->SetTrailingText(elapsedTime.String());
|
||||
|
||||
scanningTime = scanningTime + 1;
|
||||
@@ -274,11 +275,13 @@ InquiryPanel::MessageReceived(BMessage* message)
|
||||
if (!labelPlaced) {
|
||||
|
||||
labelPlaced = true;
|
||||
BString progressText =
|
||||
B_TRANSLATE("Retrieving name of ");
|
||||
progressText << bdaddrUtils::ToString(fDiscoveryAgent
|
||||
BString progressText(B_TRANSLATE("Retrieving name of %1"));
|
||||
|
||||
BString namestr;
|
||||
namestr << bdaddrUtils::ToString(fDiscoveryAgent
|
||||
->RetrieveDevices(0).ItemAt(retrievalIndex)
|
||||
->GetBluetoothAddress());
|
||||
progressText.ReplaceFirst("%1", namestr.String());
|
||||
fScanProgress->SetTrailingText(progressText.String());
|
||||
|
||||
} else {
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
#include <Alert.h>
|
||||
#include <Catalog.h>
|
||||
#include <Locale.h>
|
||||
#include <Messenger.h>
|
||||
|
||||
#include <Directory.h>
|
||||
|
||||
Reference in New Issue
Block a user