diff --git a/src/apps/debugger/user_interface/gui/teams_window/TeamsWindow.cpp b/src/apps/debugger/user_interface/gui/teams_window/TeamsWindow.cpp index aecdb51004..dc043420b7 100644 --- a/src/apps/debugger/user_interface/gui/teams_window/TeamsWindow.cpp +++ b/src/apps/debugger/user_interface/gui/teams_window/TeamsWindow.cpp @@ -22,12 +22,12 @@ #include "MessageCodes.h" #include "SettingsManager.h" +#include "StartTeamWindow.h" #include "TeamsWindow.h" #include "TeamsListView.h" enum { - MSG_CREATE_NEW_TEAM = 'crnt', MSG_TEAM_SELECTION_CHANGED = 'tesc' }; @@ -72,9 +72,13 @@ void TeamsWindow::MessageReceived(BMessage* message) { switch (message->what) { - case MSG_CREATE_NEW_TEAM: + case MSG_START_NEW_TEAM: { - // TODO: implement + fStartTeamWindow = StartTeamWindow::Create(); + if (fStartTeamWindow == NULL) + break; + + fStartTeamWindow->Show(); break; } @@ -141,9 +145,10 @@ TeamsWindow::_Init() .Add(fTeamsListView = new TeamsListView("TeamsList", fCurrentTeam)) .SetInsets(1.0f, 1.0f, 1.0f, 1.0f) .AddGroup(B_HORIZONTAL, 4.0f) - .Add(fAttachTeamButton = new BButton("Attach")) - .Add(fCreateTeamButton = new BButton("Create new team" - B_UTF8_ELLIPSIS)) + .Add(fAttachTeamButton = new BButton("Attach", new BMessage( + MSG_DEBUG_THIS_TEAM))) + .Add(fCreateTeamButton = new BButton("Start new team" + B_UTF8_ELLIPSIS, new BMessage(MSG_START_NEW_TEAM))) .End() .End(); @@ -151,10 +156,6 @@ TeamsWindow::_Init() fTeamsListView->SetSelectionMessage(new BMessage( MSG_TEAM_SELECTION_CHANGED)); - fAttachTeamButton->SetMessage(new BMessage(MSG_DEBUG_THIS_TEAM)); - fAttachTeamButton->SetEnabled(false); - fCreateTeamButton->SetMessage(new BMessage(MSG_CREATE_NEW_TEAM)); - // TODO: re-enable once action is implemented fAttachTeamButton->SetEnabled(false); } diff --git a/src/apps/debugger/user_interface/gui/teams_window/TeamsWindow.h b/src/apps/debugger/user_interface/gui/teams_window/TeamsWindow.h index d6c469ce44..d4f4ebbbcf 100644 --- a/src/apps/debugger/user_interface/gui/teams_window/TeamsWindow.h +++ b/src/apps/debugger/user_interface/gui/teams_window/TeamsWindow.h @@ -14,6 +14,7 @@ class BListView; class BFile; class BMessage; class SettingsManager; +class StartTeamWindow; class TeamsListView; class TeamsWindow : public BWindow { @@ -36,6 +37,7 @@ private: private: team_id fCurrentTeam; TeamsListView* fTeamsListView; + StartTeamWindow* fStartTeamWindow; BButton* fAttachTeamButton; BButton* fCreateTeamButton; SettingsManager* fSettingsManager;