/**
    File        : CLanguageDlg.cpp
    Description : Select language to display text in
    Author      : Raymond Marsh
    Created     : 08/01/2009
    Copyright 2009, 2010 Raymond Marsh

    This program is distributed under the terms of the GNU General Public License.
    To view a copy of the license see the file 'copying.txt'

    This file is part of the Ace Personal Finance Assistant Suite.

    Ace Personal Finance Assistant is free software: you can redistribute it and/or modify it under
    the terms of the GNU General Public License as published by the Free Software Foundation, either
    version 3 of the License, or (at your option) any later version.

    Ace Personal Finance Assistant is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
    without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along with Ace Personal Finance Assistant.
    If not, see <http://www.gnu.org/licenses/>.
**/

#include "LanguageDlg.h"

//(*InternalHeaders(CLanguageDlg)
#include <wx/xrc/xmlres.h>
//*)

//(*IdInit(CLanguageDlg)
//*)

BEGIN_EVENT_TABLE(CLanguageDlg,wxDialog)
	//(*EventTable(CLanguageDlg)
    EVT_BUTTON(wxID_OK, CLanguageDlg::OnOk)
	//*)
END_EVENT_TABLE()

CLanguageDlg::CLanguageDlg(wxWindow* parent)
{
	//(*Initialize(CLanguageDlg)
	wxXmlResource::Get()->LoadObject(this,parent,_T("CLanguageDlg"),_T("wxDialog"));
	RadioBox1 = (wxRadioBox*)FindWindow(XRCID("ID_RADIOBOX1"));
	StaticLine1 = (wxStaticLine*)FindWindow(XRCID("ID_STATICLINE1"));
	//*)
}

CLanguageDlg::~CLanguageDlg()
{
	//(*Destroy(CLanguageDlg)
	//*)
}

void CLanguageDlg::OnOk(wxCommandEvent& event)
{
    ace::g_pOptions->GLOBAL.Language = RadioBox1->GetSelection();
    EndModal(wxID_OK);
}
