mirror of
https://github.com/g4klx/ircDDBGateway.git
synced 2026-01-09 01:40:06 +01:00
Add XLX URL Validation under windows.
Fix empty string always returned for XLX URL
This commit is contained in:
parent
f2d9f61fa0
commit
0fff5f489c
|
|
@ -20,6 +20,8 @@
|
|||
#include "XLXSet.h"
|
||||
#include "Defs.h"
|
||||
|
||||
#include <wx/url.h>
|
||||
|
||||
// TODO F4FXL try to figure out why below symbols are not found under ubuntu
|
||||
//#include <wx/url.h>
|
||||
|
||||
|
|
@ -79,13 +81,17 @@ bool CXLXSet::Validate()
|
|||
if (n == wxNOT_FOUND)
|
||||
return false;
|
||||
|
||||
#if defined(__WINDOWS__)
|
||||
// TODO F4FXL try to figure out why below symbols are not found under ubuntu
|
||||
/*wxString value = m_xlxHostsFileUrl->GetValue();
|
||||
wxString value = m_xlxHostsFileUrl->GetValue();
|
||||
wxURL url(value);
|
||||
if (url.GetError() != wxURL_NOERR)
|
||||
return false;*/
|
||||
if (url.GetError() == wxURL_NOERR)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -102,13 +108,16 @@ wxString CXLXSet::getXLXHostsFileUrl() const
|
|||
{
|
||||
wxString value = m_xlxHostsFileUrl->GetValue();
|
||||
|
||||
|
||||
#if defined(__WINDOWS__)
|
||||
// TODO F4FXL try to figure out why below symbols are not found under ubuntu
|
||||
//wxURL url(value);
|
||||
//if (url.GetError() == wxURL_NOERR)
|
||||
// return value;
|
||||
|
||||
wxURL url(value);
|
||||
if (url.GetError() == wxURL_NOERR)
|
||||
return value;
|
||||
|
||||
return wxEmptyString;
|
||||
#else
|
||||
return value;
|
||||
#endif
|
||||
}
|
||||
|
||||
void CXLXSet::onEnabled(wxCommandEvent &event)
|
||||
|
|
|
|||
Loading…
Reference in a new issue