Big changes of project structure
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#define FSETTINGS_HPP
|
||||
|
||||
#include <wx/wx.h>
|
||||
#include <wx/wfstream.h>
|
||||
|
||||
#include "fbgui/fbgui.h"
|
||||
|
||||
@@ -23,28 +24,4 @@ class SettingsDialog: public VSettingsDialog {
|
||||
}
|
||||
};
|
||||
|
||||
void SettingsDialog::onDictPathClick(wxCommandEvent& event) {
|
||||
wxFileDialog dlgOpen(this, _("Open dictionary file"), wxEmptyString, wxEmptyString,
|
||||
_("Files of dictionaris (*.txt)|*.txt"), wxFD_OPEN|wxFD_FILE_MUST_EXIST);
|
||||
|
||||
if ( dlgOpen.ShowModal() == wxID_CANCEL )
|
||||
return;
|
||||
|
||||
wxFileInputStream input_stream(dlgOpen.GetPath());
|
||||
if ( !input_stream.IsOk() ) {
|
||||
wxMessageBox(_("Cannot open dictionary file ") + dlgOpen.GetPath(), _("Error"), wxICON_ERROR);
|
||||
return;
|
||||
}
|
||||
tDictPath->SetValue(dlgOpen.GetPath());
|
||||
}
|
||||
|
||||
void SettingsDialog::onOkClick(wxCommandEvent& event) {
|
||||
wxFileInputStream input_stream(tDictPath->GetValue());
|
||||
if ( !input_stream.IsOk() ) {
|
||||
wxMessageBox(_("Cannot open dictionary file ") + tDictPath->GetValue(), _("Error"), wxICON_ERROR);
|
||||
return;
|
||||
}
|
||||
EndModal(wxID_OK);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif // FSETTINGS_HPP
|
||||
|
||||
Reference in New Issue
Block a user