mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-09-02 16:22:40 -06:00
Merge continued
git-svn-id: svn://ultimatepp.org/upp/trunk@10263 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
adf46bd64e
commit
2e4b276e07
3860 changed files with 1161787 additions and 438 deletions
59
uppdev/stdapp/stdappSettings.cpp
Normal file
59
uppdev/stdapp/stdappSettings.cpp
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
#include <stdapp/stdapp.hpp>
|
||||
|
||||
void stdapp::Settings(Bar& bar)
|
||||
{
|
||||
bar.Add(t_("International"), THISBACK(OnInternational)).Help(t_("Select the application language"));
|
||||
bar.Add(t_("Options"), THISBACK(OnOptions)).Key(K_CTRL_O).Help(t_("Customize application"));
|
||||
}
|
||||
|
||||
void stdapp::OnInternational(Bar& bar)
|
||||
{
|
||||
bar.Add("Deutsch", THISBACK1(OnLanguage, LNG_('D', 'E', 'D', 'E')))
|
||||
.Check(cfg.language == LNG_('D', 'E', 'D', 'E') ? true : false)
|
||||
.Help("Deutsch als Sprache auswählen");
|
||||
bar.Add("English", THISBACK1(OnLanguage, LNG_('E', 'N', 'U', 'S')))
|
||||
.Check(cfg.language == LNG_('E', 'N', 'U', 'S') ? true : false)
|
||||
.Help("Select English as language");
|
||||
}
|
||||
|
||||
void stdapp::OnOptions()
|
||||
{
|
||||
static bool tabs_added = false;
|
||||
|
||||
if (tabs_added)
|
||||
{
|
||||
options.tab.Reset();
|
||||
}
|
||||
else
|
||||
tabs_added = true;
|
||||
options.tab.Add(language, t_("Language"));
|
||||
options.tab.Add(configuration, t_("Configuration"));
|
||||
options.tab.Add(splash_screen, t_("Splash screen"));
|
||||
options.Title(t_("Options"));
|
||||
language.current_language <<= cfg.language;
|
||||
configuration.restore_cfg <<= cfg.restore_cfg;
|
||||
splash_screen.show_splash <<= cfg.show_splash;
|
||||
options.ok <<= THISBACK(OnOptionsOK);
|
||||
options.cancel <<= THISBACK(OnOptionsCancel);
|
||||
options.Execute();
|
||||
}
|
||||
|
||||
void stdapp::OnOptionsOK()
|
||||
{
|
||||
cfg.language = ~language.current_language;
|
||||
cfg.restore_cfg = ~configuration.restore_cfg;
|
||||
cfg.show_splash = ~splash_screen.show_splash;
|
||||
options.Close();
|
||||
Init();
|
||||
}
|
||||
|
||||
void stdapp::OnOptionsCancel()
|
||||
{
|
||||
options.Close();
|
||||
}
|
||||
|
||||
void stdapp::OnLanguage(const int language_id)
|
||||
{
|
||||
cfg.language = language_id;
|
||||
Init();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue