From 5774af3740d44399ac6ad4dfc223e4c9350f98c4 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Sun, 15 Feb 2009 23:36:32 +0100 Subject: Allow pressing enter with focus in port field Added action event id to port field of login dialog. --- src/gui/login.cpp | 3 ++- src/keyboardconfig.cpp | 2 +- src/particle.h | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/gui/login.cpp b/src/gui/login.cpp index c1eda00a..e9964f2e 100644 --- a/src/gui/login.cpp +++ b/src/gui/login.cpp @@ -79,6 +79,7 @@ LoginDialog::LoginDialog(LoginData *loginData): mUserField->setActionEventId("ok"); mPassField->setActionEventId("ok"); mServerField->setActionEventId("ok"); + mPortField->setActionEventId("ok"); mServerDropDown->setActionEventId("changeSelection"); mUserField->addKeyListener(this); @@ -289,7 +290,7 @@ std::string LoginDialog::DropDownList::getElementAt(int i) { if (i < 0 || i >= getNumberOfElements()) { - return ""; + return ""; } return getServerAt(i) + ":" + getPortAt(i); } diff --git a/src/keyboardconfig.cpp b/src/keyboardconfig.cpp index 5d2d7797..73c0fe0a 100644 --- a/src/keyboardconfig.cpp +++ b/src/keyboardconfig.cpp @@ -197,7 +197,7 @@ int KeyboardConfig::getKeyEmoteOffset(int keyValue) const bool KeyboardConfig::isKeyActive(int index) { - return mActiveKeys[ mKey[index].value]; + return mActiveKeys[mKey[index].value]; } void KeyboardConfig::refreshActiveKeys() diff --git a/src/particle.h b/src/particle.h index e79a46dd..1baf11f8 100644 --- a/src/particle.h +++ b/src/particle.h @@ -19,8 +19,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _PARTICLE_H -#define _PARTICLE_H +#ifndef PARTICLE_H +#define PARTICLE_H #include #include -- cgit v1.2.3-70-g09d2