added B_QUIT_REQUESTED message

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12977 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2005-06-07 13:10:45 +00:00
parent f13db7ba25
commit 590fdd3f2d

View File

@ -61,7 +61,8 @@ ObjectWindow::ObjectWindow(BRect frame, const char* name)
BMenu* menu = new BMenu("Menus"); BMenu* menu = new BMenu("Menus");
menuBar->AddItem(menu); menuBar->AddItem(menu);
BMenuItem* menuItem = new BMenuItem("Quit", NULL, 'Q'); BMenuItem* menuItem = new BMenuItem("Quit", new BMessage(B_QUIT_REQUESTED),
'T');
menu->AddItem(menuItem); menu->AddItem(menuItem);
menuBar->AddItem(new BMenu("don't")); menuBar->AddItem(new BMenu("don't"));
@ -274,9 +275,12 @@ ObjectWindow::MessageReceived(BMessage* message)
fObjectView->SetState(NULL); fObjectView->SetState(NULL);
break; break;
case MSG_CLEAR: { case MSG_CLEAR: {
// BAlert *alert = new BAlert("Playground", "Do you really want to clear all drawing objects?", "No", "Yes"); BAlert *alert = new BAlert("Playground", "Do you really want to clear all drawing objects?", "No", "Yes");
// if (alert->Go() == 1) if (alert->Go() == 1) {
printf("calling make empty\n");
fObjectView->MakeEmpty(); fObjectView->MakeEmpty();
}
printf("done\n");
break; break;
} }
case MSG_SET_PEN_SIZE: case MSG_SET_PEN_SIZE: