Ok, that was easy to fix. I don't guarantee that I will find the bugs so fast next time!
In file amuleDlg.cpp, replace the lines:
// Placeholder. Gets updated by ShowConnectionState
wndToolbar->AddTool(ID_BUTTONCONNECT, wxT("..."), m_tblist.GetBitmap(0));
with the lines
// tmp_index takes values 0,1,2 corresponding to
// "Connect", "Disconnect" and "Connecting" respectively.
short tmp_index;
wxString tmp_btn_label;
if (theApp->serverconnect->IsConnecting()) {
tmp_index=2;
tmp_btn_label=_("Connecting");
}
else
if (theApp->serverconnect->IsConnected()) {
tmp_index=1;
tmp_btn_label=_("Disconnect");
}
else {
tmp_index=0;
tmp_btn_label=_("Connect");
}
wndToolbar->AddTool(ID_BUTTONCONNECT,tmp_btn_label, m_tblist.GetBitmap(tmp_index));