bool CDialogVolumes::_ChangeVolumeWarningOK()
{
  bool bOK = true;
  if(_CurrentVolumeModified())
  {
    wxMessageDialog dlg(
      this,
      _T("Warning: The current " Volume_string " has been modified.\n\n"
         "Do you wish to save your modifications."),
      _T("Warning"),
      wxYES_NO | wxYES_DEFAULT | wxCANCEL | wxICON_EXCLAMATION );
    int n = dlg.ShowModal();
    if(n == wxID_OK || n == wxID_YES)
    {
      if(!_SaveCurrent())
      {
        bOK = false;
        m_pChoice->SetStringSelection(m_sSelection);
      }
    }
    else if(n == wxID_CANCEL)
    {
      bOK = false;
    }
    else if(n == wxID_NO)
    {
      Restore();
    }
  }
  return bOK;
}
Esempio n. 2
0
bool CDialogVolumes::_Apply(bool bWarnUser)
{
    bool bRtn = false;
    if(TransferDataFromWindow())
    {
        bRtn = _CurrentVolumeModified()
               ? _SaveCurrent(bWarnUser) : true;
    }
    return bRtn;
}
bool CDialogVolumes::_Apply(bool bWarnUser)
{
  bool bRtn = _CurrentVolumeModified()
  ? _SaveCurrent(bWarnUser) : true;
  return bRtn;
}