http: Disallow browsing when sharing.

Because it's probably not what you want to do.  This is less confusing.
This commit is contained in:
Unknown W. Brackets 2016-07-03 20:46:06 -07:00
parent 2b613443cd
commit 66479add92

View File

@ -263,14 +263,18 @@ void RemoteISOScreen::CreateViews() {
// TODO: Could display server address for manual entry. // TODO: Could display server address for manual entry.
rightColumnItems->SetSpacing(0.0f); rightColumnItems->SetSpacing(0.0f);
rightColumnItems->Add(new Choice(sy->T("Browse Games")))->OnClick.Handle(this, &RemoteISOScreen::HandleBrowse); Choice *browseChoice = new Choice(sy->T("Browse Games"));
rightColumnItems->Add(browseChoice)->OnClick.Handle(this, &RemoteISOScreen::HandleBrowse);
ServerStatus status = RetrieveStatus(); ServerStatus status = RetrieveStatus();
if (status == ServerStatus::STOPPING) { if (status == ServerStatus::STOPPING) {
rightColumnItems->Add(new Choice(sy->T("Stopping..")))->SetDisabledPtr(&serverStopping_); rightColumnItems->Add(new Choice(sy->T("Stopping..")))->SetDisabledPtr(&serverStopping_);
browseChoice->SetEnabled(false);
} else if (status != ServerStatus::STOPPED) { } else if (status != ServerStatus::STOPPED) {
rightColumnItems->Add(new Choice(sy->T("Stop Sharing")))->OnClick.Handle(this, &RemoteISOScreen::HandleStopServer); rightColumnItems->Add(new Choice(sy->T("Stop Sharing")))->OnClick.Handle(this, &RemoteISOScreen::HandleStopServer);
browseChoice->SetEnabled(false);
} else { } else {
rightColumnItems->Add(new Choice(sy->T("Share Games (Server)")))->OnClick.Handle(this, &RemoteISOScreen::HandleStartServer); rightColumnItems->Add(new Choice(sy->T("Share Games (Server)")))->OnClick.Handle(this, &RemoteISOScreen::HandleStartServer);
browseChoice->SetEnabled(true);
} }
rightColumnItems->Add(new Spacer(25.0)); rightColumnItems->Add(new Spacer(25.0));