Allow direct connection using XLX instead of DCS

This commit is contained in:
Geoffrey Merck F4FXL - KC3FRA 2019-03-23 08:17:42 +01:00
parent b8ee3948ed
commit 075fa42d0c
11 changed files with 47 additions and 84 deletions

View file

@ -34,11 +34,10 @@ BEGIN_EVENT_TABLE(CXLXSet, wxPanel)
END_EVENT_TABLE()
CXLXSet::CXLXSet(wxWindow* parent, int id, const wxString& title, bool xlxEnabled, bool xlxOverrideLocal, const wxString& xlxHostsFileUrl) :
CXLXSet::CXLXSet(wxWindow* parent, int id, const wxString& title, bool xlxEnabled, const wxString& xlxHostsFileUrl) :
wxPanel(parent, id),
m_title(title),
m_xlxEnabled(NULL),
m_xlxOverrideLocal(NULL),
m_xlxHostsFileUrl(NULL)
{
wxFlexGridSizer* sizer = new wxFlexGridSizer(2);
@ -51,15 +50,6 @@ m_xlxHostsFileUrl(NULL)
m_xlxEnabled->Append(_("Enabled"));
sizer->Add(m_xlxEnabled, 0, wxALL | wxALIGN_LEFT, BORDER_SIZE);
m_xlxEnabled->SetSelection(xlxEnabled ? 1 : 0);
wxStaticText* xlxOverrideLocalLabel = new wxStaticText(this, -1, _("Override local hosts files"));
sizer->Add(xlxOverrideLocalLabel, 0, wxALL | wxALIGN_RIGHT, BORDER_SIZE);
m_xlxOverrideLocal = new wxChoice(this, CHOICE_ENABLED, wxDefaultPosition, wxSize(CONTROL_WIDTH, -1));
m_xlxOverrideLocal->Append(_("No"));
m_xlxOverrideLocal->Append(_("Yes"));
sizer->Add(m_xlxOverrideLocal, 0, wxALL | wxALIGN_LEFT, BORDER_SIZE);
m_xlxOverrideLocal->SetSelection(xlxOverrideLocal ? 1 : 0);
wxStaticText* xlxHostsFileUrlLabel = new wxStaticText(this, -1, _("Hosts file URL"));
sizer->Add(xlxHostsFileUrlLabel, 0, wxALL | wxALIGN_RIGHT, BORDER_SIZE);
@ -88,10 +78,6 @@ bool CXLXSet::Validate()
int n = m_xlxEnabled->GetCurrentSelection();
if (n == wxNOT_FOUND)
return false;
n = m_xlxOverrideLocal->GetCurrentSelection();
if (n == wxNOT_FOUND)
return false;
// TODO F4FXL try to figure out why below symbols are not found under ubuntu
/*wxString value = m_xlxHostsFileUrl->GetValue();
@ -102,14 +88,6 @@ bool CXLXSet::Validate()
return true;
}
bool CXLXSet::getXLXOverrideLocal() const
{
int c = m_xlxEnabled->GetCurrentSelection();
if (c == wxNOT_FOUND)
return false;
return c == 1;
}
bool CXLXSet::getXLXEnabled() const
{