- Make the preflet not to use all workspaces
- CheckStyled git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34882 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
23992a691c
commit
b64c9fc439
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2008-09, Oliver Ruiz Dorantes, <oliver.ruiz.dorantes_at_gmail.com>
|
* Copyright 2008-10, Oliver Ruiz Dorantes, <oliver.ruiz.dorantes_at_gmail.com>
|
||||||
* All rights reserved. Distributed under the terms of the MIT License.
|
* All rights reserved. Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
#include "BluetoothWindow.h"
|
#include "BluetoothWindow.h"
|
||||||
@ -34,8 +34,7 @@ LocalDevice* ActiveLocalDevice = NULL;
|
|||||||
|
|
||||||
BluetoothWindow::BluetoothWindow(BRect frame)
|
BluetoothWindow::BluetoothWindow(BRect frame)
|
||||||
: BWindow(frame, TR("Bluetooth"), B_TITLED_WINDOW,
|
: BWindow(frame, TR("Bluetooth"), B_TITLED_WINDOW,
|
||||||
B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS,
|
B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS)
|
||||||
B_ALL_WORKSPACES)
|
|
||||||
{
|
{
|
||||||
SetLayout(new BGroupLayout(B_HORIZONTAL));
|
SetLayout(new BGroupLayout(B_HORIZONTAL));
|
||||||
|
|
||||||
@ -50,20 +49,27 @@ BluetoothWindow::BluetoothWindow(BRect frame)
|
|||||||
|
|
||||||
// Add File menu to menu bar
|
// Add File menu to menu bar
|
||||||
BMenu* menu = new BMenu(TR("Server"));
|
BMenu* menu = new BMenu(TR("Server"));
|
||||||
menu->AddItem(new BMenuItem(TR("Start bluetooth services" B_UTF8_ELLIPSIS), new BMessage(kMsgStartServices), 0));
|
menu->AddItem(new BMenuItem(TR("Start bluetooth services" B_UTF8_ELLIPSIS),
|
||||||
menu->AddItem(new BMenuItem(TR("Stop bluetooth services" B_UTF8_ELLIPSIS), new BMessage(kMsgStopServices), 0));
|
new BMessage(kMsgStartServices), 0));
|
||||||
|
menu->AddItem(new BMenuItem(TR("Stop bluetooth services" B_UTF8_ELLIPSIS),
|
||||||
|
new BMessage(kMsgStopServices), 0));
|
||||||
menu->AddSeparatorItem();
|
menu->AddSeparatorItem();
|
||||||
menu->AddItem(new BMenuItem(TR("Show bluetooth console" B_UTF8_ELLIPSIS), new BMessage(kMsgStartServices), 0));
|
menu->AddItem(new BMenuItem(TR("Show bluetooth console" B_UTF8_ELLIPSIS),
|
||||||
menu->AddItem(new BMenuItem(TR("Refresh LocalDevices" B_UTF8_ELLIPSIS), new BMessage(kMsgRefresh), 0));
|
new BMessage(kMsgStartServices), 0));
|
||||||
|
menu->AddItem(new BMenuItem(TR("Refresh LocalDevices" B_UTF8_ELLIPSIS),
|
||||||
|
new BMessage(kMsgRefresh), 0));
|
||||||
fMenubar->AddItem(menu);
|
fMenubar->AddItem(menu);
|
||||||
|
|
||||||
menu = new BMenu(TR("View"));
|
menu = new BMenu(TR("View"));
|
||||||
menu->AddItem(new BMenuItem(TR("Connections & channels list" B_UTF8_ELLIPSIS), NULL, 0));
|
menu->AddItem(new BMenuItem(TR("Connections & channels" B_UTF8_ELLIPSIS),
|
||||||
menu->AddItem(new BMenuItem(TR("Remote devices list" B_UTF8_ELLIPSIS), NULL, 0));
|
NULL, 0));
|
||||||
|
menu->AddItem(new BMenuItem(TR("Remote devices list" B_UTF8_ELLIPSIS),
|
||||||
|
NULL, 0));
|
||||||
fMenubar->AddItem(menu);
|
fMenubar->AddItem(menu);
|
||||||
|
|
||||||
menu = new BMenu(TR("Help"));
|
menu = new BMenu(TR("Help"));
|
||||||
menu->AddItem(new BMenuItem(TR("About Bluetooth" B_UTF8_ELLIPSIS), new BMessage(B_ABOUT_REQUESTED), 0));
|
menu->AddItem(new BMenuItem(TR("About Bluetooth" B_UTF8_ELLIPSIS),
|
||||||
|
new BMessage(B_ABOUT_REQUESTED), 0));
|
||||||
fMenubar->AddItem(menu);
|
fMenubar->AddItem(menu);
|
||||||
|
|
||||||
BTabView* tabView = new BTabView("tabview", B_WIDTH_FROM_LABEL);
|
BTabView* tabView = new BTabView("tabview", B_WIDTH_FROM_LABEL);
|
||||||
@ -114,16 +120,21 @@ BluetoothWindow::MessageReceived(BMessage *message)
|
|||||||
*/ break;
|
*/ break;
|
||||||
case kMsgStartServices:
|
case kMsgStartServices:
|
||||||
printf("kMsgStartServices\n");
|
printf("kMsgStartServices\n");
|
||||||
if (!be_roster->IsRunning(BLUETOOTH_SIGNATURE))
|
if (!be_roster->IsRunning(BLUETOOTH_SIGNATURE)) {
|
||||||
{
|
status_t error;
|
||||||
printf("kMsgStopServices: %s\n", strerror(be_roster->Launch(BLUETOOTH_SIGNATURE)));
|
|
||||||
|
error = be_roster->Launch(BLUETOOTH_SIGNATURE);
|
||||||
|
printf("kMsgStopServices: %s\n", strerror(error));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kMsgStopServices:
|
case kMsgStopServices:
|
||||||
printf("kMsgStopServices\n");
|
printf("kMsgStopServices\n");
|
||||||
if (be_roster->IsRunning(BLUETOOTH_SIGNATURE))
|
if (be_roster->IsRunning(BLUETOOTH_SIGNATURE)) {
|
||||||
{
|
status_t error;
|
||||||
printf("kMsgStopServices: %s\n", strerror(BMessenger(BLUETOOTH_SIGNATURE).SendMessage(B_QUIT_REQUESTED)));
|
|
||||||
|
error = BMessenger(BLUETOOTH_SIGNATURE).SendMessage(B_QUIT_REQUESTED);
|
||||||
|
printf("kMsgStopServices: %s\n", strerror(error));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -143,7 +154,6 @@ BluetoothWindow::MessageReceived(BMessage *message)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
BluetoothWindow::QuitRequested(void)
|
BluetoothWindow::QuitRequested(void)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user