mirror of
https://github.com/g4klx/ircDDBGateway.git
synced 2026-01-06 00:09:58 +01:00
Merge pull request #34 from F4FXL/bugfix/CCSSaveConfig
Fix missing or empty CCS_Hosts.txt preventing to save the configuration
This commit is contained in:
commit
5a9c6bc074
|
|
@ -21,6 +21,7 @@
|
|||
#include "Defs.h"
|
||||
|
||||
#include <wx/filename.h>
|
||||
#include <wx/msw/msgdlg.h>
|
||||
|
||||
const unsigned int CONTROL_WIDTH = 130U;
|
||||
|
||||
|
|
@ -109,12 +110,14 @@ bool CDCSSet::Validate()
|
|||
if (n == wxNOT_FOUND)
|
||||
return false;
|
||||
|
||||
n = m_ccsEnabled->GetCurrentSelection();
|
||||
if (n == wxNOT_FOUND)
|
||||
return false;
|
||||
bool ccsEnabled = m_ccsEnabled->GetCurrentSelection() == 1;
|
||||
bool ccsHostSelected = m_ccsHosts->GetCurrentSelection() != wxNOT_FOUND;
|
||||
|
||||
if (m_ccsHosts->GetCurrentSelection() == wxNOT_FOUND)
|
||||
if (ccsEnabled && !ccsHostSelected) {
|
||||
wxMessageDialog dialog(this, _("CCS is enabled and no CCS host has been selected. Either disable CCS or select a CCS host."), m_title + _(" Error"), wxICON_ERROR);
|
||||
dialog.ShowModal();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue