Add UserInterfaceListener hook to request a team restart.
This commit is contained in:
@@ -736,17 +736,7 @@ TeamDebugger::MessageReceived(BMessage* message)
|
|||||||
if (fCommandLineArgc == 0)
|
if (fCommandLineArgc == 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
BString argumentString;
|
fListener->TeamDebuggerRestartRequested(this);
|
||||||
for (int i = 0; i < fCommandLineArgc; i++) {
|
|
||||||
if (i > 0)
|
|
||||||
argumentString.Append(" ");
|
|
||||||
argumentString.Append(fCommandLineArgv[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
BMessage startMessage(MSG_START_NEW_TEAM);
|
|
||||||
startMessage.AddString("path", fCommandLineArgv[0]);
|
|
||||||
startMessage.AddString("arguments", argumentString);
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -961,6 +951,13 @@ TeamDebugger::DebugReportRequested(entry_ref* targetPath)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
TeamDebugger::TeamRestartRequested()
|
||||||
|
{
|
||||||
|
PostMessage(MSG_TEAM_RESTART_REQUESTED);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
TeamDebugger::UserInterfaceQuitRequested(QuitOption quitOption)
|
TeamDebugger::UserInterfaceQuitRequested(QuitOption quitOption)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -90,6 +90,8 @@ private:
|
|||||||
|
|
||||||
virtual void DebugReportRequested(entry_ref* targetPath);
|
virtual void DebugReportRequested(entry_ref* targetPath);
|
||||||
|
|
||||||
|
virtual void TeamRestartRequested();
|
||||||
|
|
||||||
virtual bool UserInterfaceQuitRequested(
|
virtual bool UserInterfaceQuitRequested(
|
||||||
QuitOption quitOption);
|
QuitOption quitOption);
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2009, Ingo Weinhold, [email protected].
|
* Copyright 2009, Ingo Weinhold, [email protected].
|
||||||
|
* Copyright 2013, Rene Gollent, [email protected].
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
#ifndef USER_INTERFACE_H
|
#ifndef USER_INTERFACE_H
|
||||||
@@ -121,6 +122,8 @@ public:
|
|||||||
|
|
||||||
virtual void DebugReportRequested(entry_ref* path) = 0;
|
virtual void DebugReportRequested(entry_ref* path) = 0;
|
||||||
|
|
||||||
|
virtual void TeamRestartRequested() = 0;
|
||||||
|
|
||||||
virtual bool UserInterfaceQuitRequested(
|
virtual bool UserInterfaceQuitRequested(
|
||||||
QuitOption quitOption
|
QuitOption quitOption
|
||||||
= QUIT_OPTION_ASK_USER) = 0;
|
= QUIT_OPTION_ASK_USER) = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user