don't compare bools with NULL
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36266 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
9b70ed7b55
commit
b21348b405
@ -217,12 +217,14 @@ void MyFrame::Enable()
|
|||||||
GetServername()->Enable(m_client == NULL);
|
GetServername()->Enable(m_client == NULL);
|
||||||
GetHostname()->Enable(m_client == NULL);
|
GetHostname()->Enable(m_client == NULL);
|
||||||
GetTopic()->Enable(m_client == NULL);
|
GetTopic()->Enable(m_client == NULL);
|
||||||
GetDisconnect()->Enable(m_client != NULL && m_client->IsConnected());
|
|
||||||
GetStartAdvise()->Enable(m_client != NULL && m_client->IsConnected());
|
const bool isConnected = m_client->IsConnected();
|
||||||
GetStopAdvise()->Enable(m_client != NULL && m_client->IsConnected());
|
GetDisconnect()->Enable(m_client != NULL && isConnected);
|
||||||
GetExecute()->Enable(m_client != NULL && m_client->IsConnected());
|
GetStartAdvise()->Enable(m_client != NULL && isConnected);
|
||||||
GetPoke()->Enable(m_client != NULL && m_client->IsConnected());
|
GetStopAdvise()->Enable(m_client != NULL && isConnected);
|
||||||
GetRequest()->Enable(m_client != NULL && m_client->IsConnected());
|
GetExecute()->Enable(m_client != NULL && isConnected);
|
||||||
|
GetPoke()->Enable(m_client != NULL && isConnected);
|
||||||
|
GetRequest()->Enable(m_client != NULL && isConnected);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyFrame::OnClose(wxCloseEvent& event)
|
void MyFrame::OnClose(wxCloseEvent& event)
|
||||||
|
@ -165,7 +165,7 @@ void MyFrame::Enable()
|
|||||||
GetStart()->Enable(m_server == NULL);
|
GetStart()->Enable(m_server == NULL);
|
||||||
GetServername()->Enable(m_server == NULL);
|
GetServername()->Enable(m_server == NULL);
|
||||||
GetAdvise()->Enable(m_server && m_server->CanAdvise());
|
GetAdvise()->Enable(m_server && m_server->CanAdvise());
|
||||||
GetDisconnect()->Enable(m_server && m_server->IsConnected() != NULL);
|
GetDisconnect()->Enable(m_server && m_server->IsConnected());
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyFrame::OnClose(wxCloseEvent& event)
|
void MyFrame::OnClose(wxCloseEvent& event)
|
||||||
|
Loading…
Reference in New Issue
Block a user