Filled up the quitting code path a bit. The TeamDebugger throws up an alert
asking what to do with the debugged team. Killing it is not yet implemented. Then it notifies the application about the quit request. That in turn tears down the TeamDebugger and if no other ones are left, it quits itself. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31201 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -177,6 +177,19 @@ public:
|
||||
virtual void MessageReceived(BMessage* message)
|
||||
{
|
||||
switch (message->what) {
|
||||
case MSG_DEBUGGER_QUIT_REQUESTED:
|
||||
{
|
||||
TeamDebugger* debugger = NULL;
|
||||
if (message->FindPointer("debugger",
|
||||
(void**)&debugger) == B_OK
|
||||
&& fTeamDebuggers.HasItem(debugger)) {
|
||||
fTeamDebuggers.RemoveItem(debugger);
|
||||
debugger->DeleteSelf();
|
||||
if (fTeamDebuggers.CountItems() == 0)
|
||||
PostMessage(B_QUIT_REQUESTED);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
BApplication::MessageReceived(message);
|
||||
break;
|
||||
@@ -257,7 +270,8 @@ printf("debugger for team %ld created and initialized successfully!\n", team);
|
||||
virtual bool QuitRequested()
|
||||
{
|
||||
// TODO:...
|
||||
return true;
|
||||
// return true;
|
||||
return BApplication::QuitRequested();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user