1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 // general_dlg.cpp : implementation file
21 #include "client_config.h"
22 #include "general_dlg.h"
24 #include "client_configdlg.h"
26 // ***************************************************************************
28 // ***************************************************************************
30 CGeneralDlg::CGeneralDlg(CWnd
* pParent
/*=NULL*/)
31 : CBaseDialog(CGeneralDlg::IDD
, pParent
)
33 //{{AFX_DATA_INIT(CGeneralDlg)
40 // ***************************************************************************
42 void CGeneralDlg::DoDataExchange(CDataExchange
* pDX
)
44 CDialog::DoDataExchange(pDX
);
45 //{{AFX_DATA_MAP(CGeneralDlg)
46 DDX_Check(pDX
, IDC_SLEEP
, Sleep
);
47 DDX_Check(pDX
, IDC_SAVE_CONFIG
, SaveConfig
);
48 DDX_CBIndex(pDX
, IDC_LANGUAGE
, Language
);
52 // ***************************************************************************
54 BEGIN_MESSAGE_MAP(CGeneralDlg
, CDialog
)
55 //{{AFX_MSG_MAP(CGeneralDlg)
56 ON_BN_CLICKED(IDC_SLEEP
, OnSleep
)
57 ON_BN_CLICKED(IDC_SAVE_CONFIG
, OnSaveConfig
)
58 ON_CBN_SELENDOK(IDC_LANGUAGE
, OnSelendokLanguage
)
62 // ***************************************************************************
63 // CGeneralDlg message handlers
64 // ***************************************************************************
66 void CGeneralDlg::OnSleep()
74 // ***************************************************************************
76 void CGeneralDlg::updateState ()
80 // ***************************************************************************
82 void CGeneralDlg::OnSaveConfig()
87 // ***************************************************************************
89 BOOL
CGeneralDlg::OnInitDialog()
91 CDialog::OnInitDialog();
95 return TRUE
; // return TRUE unless you set the focus to a control
96 // EXCEPTION: OCX Property Pages should return FALSE
99 // ***************************************************************************
101 void CGeneralDlg::OnSelendokLanguage()
105 // Localize the windows
106 CClient_configDlg
*dlg
= (CClient_configDlg
*)theApp
.m_pMainWnd
;
107 dlg
->UpdateData (TRUE
);
108 dlg
->changeLanguage (::GetIntForceLanguage()?"en" : (dlg
->GeneralDlg
.Language
==2)?"de":(dlg
->GeneralDlg
.Language
==1)?"fr":"en");
111 // ***************************************************************************