summaryrefslogtreecommitdiff
path: root/src/gui/setup_theme.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-02-13 22:58:01 +0300
committerAndrei Karas <akaras@inbox.ru>2013-02-14 01:42:53 +0300
commite40411cdc287343a32a8371f2116fcc11545b466 (patch)
tree4655f02211f1b08b8ead94175fd419c6e766f9c8 /src/gui/setup_theme.cpp
parent2ebce73d5018945bb5f5363913a4096e04bf5a0f (diff)
downloadmv-e40411cdc287343a32a8371f2116fcc11545b466.tar.gz
mv-e40411cdc287343a32a8371f2116fcc11545b466.tar.bz2
mv-e40411cdc287343a32a8371f2116fcc11545b466.tar.xz
mv-e40411cdc287343a32a8371f2116fcc11545b466.zip
Improve event.getId() speed.
Diffstat (limited to 'src/gui/setup_theme.cpp')
-rw-r--r--src/gui/setup_theme.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/gui/setup_theme.cpp b/src/gui/setup_theme.cpp
index 74cd91854..f8437b152 100644
--- a/src/gui/setup_theme.cpp
+++ b/src/gui/setup_theme.cpp
@@ -349,7 +349,8 @@ void Setup_Theme::updateInfo()
void Setup_Theme::action(const gcn::ActionEvent &event)
{
- if (event.getId() == ACTION_THEME)
+ const std::string &eventId = event.getId();
+ if (eventId == ACTION_THEME)
{
if (mThemeDropDown->getSelected() == 0)
mTheme.clear();
@@ -357,11 +358,11 @@ void Setup_Theme::action(const gcn::ActionEvent &event)
mTheme = mThemeDropDown->getSelectedString();
updateInfo();
}
- else if (event.getId() == ACTION_FONT)
+ else if (eventId == ACTION_FONT)
{
mFont = mFontDropDown->getSelectedString();
}
- else if (event.getId() == ACTION_LANG)
+ else if (eventId == ACTION_LANG)
{
const int id = mLangDropDown->getSelected();
if (id < 0 || id >= langs_count)
@@ -369,27 +370,27 @@ void Setup_Theme::action(const gcn::ActionEvent &event)
else
mLang = LANG_NAME[id].value;
}
- else if (event.getId() == ACTION_BOLD_FONT)
+ else if (eventId == ACTION_BOLD_FONT)
{
mBoldFont = mBoldFontDropDown->getSelectedString();
}
- else if (event.getId() == ACTION_PARTICLE_FONT)
+ else if (eventId == ACTION_PARTICLE_FONT)
{
mParticleFont = mParticleFontDropDown->getSelectedString();
}
- else if (event.getId() == ACTION_HELP_FONT)
+ else if (eventId == ACTION_HELP_FONT)
{
mHelpFont = mHelpFontDropDown->getSelectedString();
}
- else if (event.getId() == ACTION_SECURE_FONT)
+ else if (eventId == ACTION_SECURE_FONT)
{
mSecureFont = mSecureFontDropDown->getSelectedString();
}
- else if (event.getId() == ACTION_JAPAN_FONT)
+ else if (eventId == ACTION_JAPAN_FONT)
{
mJapanFont = mJapanFontDropDown->getSelectedString();
}
- else if (event.getId() == ACTION_INFO)
+ else if (eventId == ACTION_INFO)
{
new OkDialog(_("Theme info"), mThemeInfo, DIALOG_OK,
false, true, nullptr, 600);