From d268447e18c6e3edd80658f8f8d4317740c33af9 Mon Sep 17 00:00:00 2001 From: Ira Rice Date: Tue, 10 Feb 2009 20:09:33 -0700 Subject: Fixed header files, as well as removed the unused buddy list class (not useful since buddy lists are tracked through the player relation interface instead) Signed-off-by: Ira Rice --- src/gui/itempopup.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/gui/itempopup.cpp') diff --git a/src/gui/itempopup.cpp b/src/gui/itempopup.cpp index ddce449a..9c0bd65c 100644 --- a/src/gui/itempopup.cpp +++ b/src/gui/itempopup.cpp @@ -1,22 +1,23 @@ /* - * The Mana World + * Aethyra * Copyright (C) 2008 The Legend of Mazzeroth Development Team * Copyright (C) 2008 The Mana World Development Team * - * This file is part of The Mana World. + * This file is part of Aethyra based on original code + * from The Legend of Mazzeroth. * - * The Mana World is free software; you can redistribute it and/or modify + * This program 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 2 of the License, or * any later version. * - * The Mana World is distributed in the hope that it will be useful, + * This program 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 The Mana World; if not, write to the Free Software + * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -- cgit v1.2.3-70-g09d2 From ff1205d2b89f7f2273a32176c746f36836d7bfa9 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Tue, 10 Feb 2009 23:35:30 +0100 Subject: Use string::empty() instead of comparing to "" --- src/being.cpp | 2 +- src/gui/browserbox.cpp | 2 +- src/gui/chat.cpp | 18 +++++++++--------- src/gui/itempopup.cpp | 2 +- src/gui/login.cpp | 10 +++++----- src/gui/recorder.cpp | 2 +- src/gui/register.cpp | 2 +- src/localplayer.cpp | 3 ++- src/main.cpp | 3 ++- src/monster.cpp | 2 +- src/particleemitter.cpp | 4 ++-- src/party.cpp | 8 ++++---- src/player.cpp | 7 ++++--- src/player_relations.cpp | 2 +- src/resources/spritedef.cpp | 4 ++-- 15 files changed, 37 insertions(+), 34 deletions(-) (limited to 'src/gui/itempopup.cpp') diff --git a/src/being.cpp b/src/being.cpp index 7a7f3df7..d847b032 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -214,7 +214,7 @@ void Being::setSpeech(const std::string &text, Uint32 time) end = mSpeech.find(']', start); } - if (mSpeech != "") + if (!mSpeech.empty()) mSpeechTime = time <= SPEECH_MAX_TIME ? time : SPEECH_MAX_TIME; } diff --git a/src/gui/browserbox.cpp b/src/gui/browserbox.cpp index f0c77e46..37480415 100644 --- a/src/gui/browserbox.cpp +++ b/src/gui/browserbox.cpp @@ -104,7 +104,7 @@ void BrowserBox::addRow(const std::string &row) newRow += "##<" + bLink.caption; tmp.erase(0, idx3 + 2); - if (tmp != "") + if (!tmp.empty()) { newRow += "##>"; } diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp index 49df0f9d..953a9a37 100644 --- a/src/gui/chat.cpp +++ b/src/gui/chat.cpp @@ -92,7 +92,7 @@ Window(""), mNetwork(network), mTmpVisible(false) // Read the party prefix std::string partyPrefix = config.getValue("PartyPrefix", "$"); - mPartyPrefix = (partyPrefix == "" ? '$' : partyPrefix.at(0)); + mPartyPrefix = (partyPrefix.empty() ? '$' : partyPrefix.at(0)); mReturnToggles = config.getValue("ReturnToggles", "0") == "1"; mRecorder = new Recorder(this); mParty = new Party(this, mNetwork); @@ -193,7 +193,7 @@ void ChatWindow::chatLog(std::string line, int own, bool ignoreRecord) lineColor = "##S"; } - if (tmp.nick == "" && tmp.text.substr(0, 17) == "Visible GM status") + if (tmp.nick.empty() && tmp.text.substr(0, 17) == "Visible GM status") { player_node->setGM(); } @@ -447,7 +447,7 @@ void ChatWindow::chatSend(const std::string &nick, std::string msg) msg = msg.substr(0, space); } - if (msg != "" && msg.at(0) == '/') + if (!msg.empty() && msg.at(0) == '/') { msg.erase(0, 1); } @@ -475,7 +475,7 @@ void ChatWindow::chatSend(const std::string &nick, std::string msg) mRecorder->changeRecordingStatus(msg); else if (command == "toggle") { - if (msg == "") + if (msg.empty()) { chatLog(mReturnToggles ? _("Return toggles chat.") : _("Message closes chat."), BY_SERVER); @@ -506,7 +506,7 @@ void ChatWindow::chatSend(const std::string &nick, std::string msg) } else if (command == "party") { - if (msg == "") + if (msg.empty()) { chatLog(_("Unknown party command... Type \"/help\" party for more " "information."), BY_SERVER); @@ -517,7 +517,7 @@ void ChatWindow::chatSend(const std::string &nick, std::string msg) std::string rest = (space == std::string::npos ? "" : msg.substr(space + 1, msg.length())); - if (rest != "") + if (!rest.empty()) { msg = msg.substr(0, space); trim(msg); @@ -564,7 +564,7 @@ void ChatWindow::chatSend(const std::string &nick, std::string msg) { if ((*bi)->getType() == Being::PLAYER) { - if (response != "") + if (!response.empty()) { response += ", "; } @@ -757,7 +757,7 @@ void ChatWindow::party(const std::string & command, const std::string & rest) { if (command == "prefix") { - if (rest == "") + if (rest.empty()) { char temp[2] = "."; *temp = mPartyPrefix; @@ -788,7 +788,7 @@ void ChatWindow::party(const std::string & command, const std::string & rest) void ChatWindow::help(const std::string & msg1, const std::string & msg2) { chatLog(_("-- Help --"), BY_SERVER); - if (msg1 == "") + if (msg1.empty()) { chatLog(_("/announce: Global announcement (GM only)"), BY_SERVER); chatLog(_("/clear: Clears this window"), BY_SERVER); diff --git a/src/gui/itempopup.cpp b/src/gui/itempopup.cpp index 9c0bd65c..f589286b 100644 --- a/src/gui/itempopup.cpp +++ b/src/gui/itempopup.cpp @@ -137,7 +137,7 @@ void ItemPopup::setItem(const ItemInfo &item) mItemWeightScroll->setDimension(gcn::Rectangle(2, 0, minWidth, numRowsWeight * getFont()->getHeight())); - if (item.getEffect() == "") + if (item.getEffect().empty()) { setContentSize(minWidth, (numRowsDesc * getFont()->getHeight() + (3 * getFont()->getHeight()))); diff --git a/src/gui/login.cpp b/src/gui/login.cpp index 14370485..1d864a96 100644 --- a/src/gui/login.cpp +++ b/src/gui/login.cpp @@ -194,7 +194,7 @@ bool LoginDialog::canSubmit() bool LoginDialog::isUShort(const std::string &str) { - if (str == "") + if (str.empty()) { return false; } @@ -233,7 +233,7 @@ unsigned short LoginDialog::getUShort(const std::string &str) void LoginDialog::DropDownList::saveEntry(const std::string &server, const std::string &port, int &saved) { - if (saved < MAX_SERVER_LIST_SIZE && server != "") + if (saved < MAX_SERVER_LIST_SIZE && !server.empty()) { config.setValue(mConfigPrefix + "Server" + toString(saved), server); config.setValue(mConfigPrefix + "Port" + toString(saved), port); @@ -252,7 +252,7 @@ LoginDialog::DropDownList::DropDownList(std::string prefix, { std::string server = config.getValue(mConfigPrefix + "Server" + toString(i), ""); - if (server == "") // Just in case had original config entries + if (server.empty()) // Just in case had original config entries { server = config.getValue(mConfigPrefix + "ServerList" + toString(i), ""); @@ -260,13 +260,13 @@ LoginDialog::DropDownList::DropDownList(std::string prefix, std::string port = config.getValue(mConfigPrefix + "Port" + toString(i), dfltPort.front()); - if (server != "") + if (!server.empty()) { mServers.push_back(server); mPorts.push_back(port); } } - if (mServers.size() == 0) + if (mServers.empty()) { mServers.assign(dflt.begin(), dflt.end()); mPorts.assign(dfltPort.begin(), dfltPort.end()); diff --git a/src/gui/recorder.cpp b/src/gui/recorder.cpp index c7989495..032b9790 100644 --- a/src/gui/recorder.cpp +++ b/src/gui/recorder.cpp @@ -69,7 +69,7 @@ void Recorder::changeRecordingStatus(const std::string &msg) std::string msgCopy = msg; trim(msgCopy); - if (msgCopy == "") + if (msgCopy.empty()) { if (mStream.is_open()) { diff --git a/src/gui/register.cpp b/src/gui/register.cpp index 9be44f43..50182de1 100644 --- a/src/gui/register.cpp +++ b/src/gui/register.cpp @@ -250,7 +250,7 @@ bool RegisterDialog::canSubmit() const bool RegisterDialog::isUShort(const std::string &str) { - if (str == "") + if (str.empty()) { return false; } diff --git a/src/localplayer.cpp b/src/localplayer.cpp index fb539a46..b8703b70 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -537,7 +537,8 @@ void LocalPlayer::attack(Being *target, bool keep) if (mEquippedWeapon) { std::string soundFile = mEquippedWeapon->getSound(EQUIP_EVENT_STRIKE); - if (soundFile != "") sound.playSfx(soundFile); + if (!soundFile.empty()) + sound.playSfx(soundFile); } else { diff --git a/src/main.cpp b/src/main.cpp index 7f2012c9..c68c02d8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -975,7 +975,8 @@ int main(int argc, char *argv[]) nextState); positionDialog(currentDialog, screenWidth, screenHeight); - if (options.chooseDefault || options.playername != "") + if (options.chooseDefault + || !options.playername.empty()) { ((ServerSelectDialog*) currentDialog)->action( gcn::ActionEvent(NULL, "ok")); diff --git a/src/monster.cpp b/src/monster.cpp index 9f12ebf4..cc529196 100644 --- a/src/monster.cpp +++ b/src/monster.cpp @@ -125,7 +125,7 @@ void Monster::setAction(Action action) //attack particle effect particleEffect = getInfo().getAttackParticleEffect(); - if (particleEffect != "" && mParticleEffects) + if (!particleEffect.empty() && mParticleEffects) { switch (mDirection) { diff --git a/src/particleemitter.cpp b/src/particleemitter.cpp index 2c239fb9..84c4c1ec 100644 --- a/src/particleemitter.cpp +++ b/src/particleemitter.cpp @@ -42,7 +42,7 @@ ParticleEmitter::ParticleEmitter(xmlNodePtr emitterNode, Particle *target, Map * mMap = map; mParticleTarget = target; - //initializing default values + // Initializing default values mParticlePosX.set(0.0f); mParticlePosY.set(0.0f); mParticlePosZ.set(0.0f); @@ -92,7 +92,7 @@ ParticleEmitter::ParticleEmitter(xmlNodePtr emitterNode, Particle *target, Map * { std::string image = XML::getProperty(propertyNode, "value", ""); // Don't leak when multiple images are defined - if (image != "" && !mParticleImage) + if (!image.empty() && !mParticleImage) { ResourceManager *resman = ResourceManager::getInstance(); mParticleImage = resman->getImage(image); diff --git a/src/party.cpp b/src/party.cpp index 75569bc5..a4f1b940 100644 --- a/src/party.cpp +++ b/src/party.cpp @@ -67,7 +67,7 @@ void Party::respond(const std::string &command, const std::string &args) void Party::create(const std::string &party) { - if (party == "") + if (party.empty()) { mChat->chatLog(_("Party name is missing."), BY_SERVER); return; @@ -122,7 +122,7 @@ void Party::invitedAsk(const std::string &nick, int gender, const std::string &partyName) { mPartyName = partyName; /* Quick and nasty - needs redoing */ - if (nick == "") + if (nick.empty()) { mChat->chatLog(_("You can\'t have a blank party name!"), BY_SERVER); return; @@ -153,7 +153,7 @@ void Party::leftResponse(const std::string &nick) void Party::receiveChat(Being *being, const std::string &msg) { - if (being == NULL) + if (!being) { return; } @@ -169,7 +169,7 @@ void Party::receiveChat(Being *being, const std::string &msg) void Party::help(const std::string &msg) { - if (msg == "") + if (msg.empty()) { mChat->chatLog(_("Command: /party "), BY_SERVER); mChat->chatLog(_("where can be one of:"), BY_SERVER); diff --git a/src/player.cpp b/src/player.cpp index 0eea8a6a..5256831b 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -170,11 +170,12 @@ void Player::setSprite(int slot, int id, std::string color) std::string filename = ItemDB::get(id).getSprite(mGender); AnimatedSprite *equipmentSprite = NULL; - if (filename != "") + if (!filename.empty()) { - if (color!="") filename += "|" + color; + if (!color.empty()) + filename += "|" + color; equipmentSprite = AnimatedSprite::load( - "graphics/sprites/" + filename); + "graphics/sprites/" + filename); } if (equipmentSprite) diff --git a/src/player_relations.cpp b/src/player_relations.cpp index d9ff4b8d..1c1ba669 100644 --- a/src/player_relations.cpp +++ b/src/player_relations.cpp @@ -59,7 +59,7 @@ class PlayerConfSerialiser : public ConfigurationListManager *container) { std::string name = cobj->getValue(NAME, ""); - if (name == "") + if (name.empty()) return container; if (!(*container)[name]) { diff --git a/src/resources/spritedef.cpp b/src/resources/spritedef.cpp index 989741dc..d6cc8960 100644 --- a/src/resources/spritedef.cpp +++ b/src/resources/spritedef.cpp @@ -322,7 +322,7 @@ SpriteDef::~SpriteDef() SpriteAction SpriteDef::makeSpriteAction(const std::string& action) { - if (action == "" || action == "default") { + if (action.empty() || action == "default") { return ACTION_DEFAULT; } if (action == "stand") { @@ -374,7 +374,7 @@ SpriteAction SpriteDef::makeSpriteAction(const std::string& action) SpriteDirection SpriteDef::makeSpriteDirection(const std::string& direction) { - if (direction == "" || direction == "default") { + if (direction.empty() || direction == "default") { return DIRECTION_DEFAULT; } else if (direction == "up") { -- cgit v1.2.3-70-g09d2 From 4f038e895499fcf94fec168ef964f7de4f813113 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Tue, 10 Feb 2009 22:54:14 +0100 Subject: Whitespace fixes Mainly removed trailing whitespace. Also small fix in header of recorder.cpp. --- src/effectmanager.h | 2 +- src/game.cpp | 6 +++--- src/gui/itempopup.cpp | 6 +++--- src/gui/minimap.cpp | 2 +- src/gui/recorder.cpp | 7 +++---- src/gui/setup_players.cpp | 2 +- src/gui/setup_players.h | 5 +++-- src/gui/shortcutwindow.cpp | 2 +- src/gui/status.cpp | 2 +- src/gui/widgets/tab.cpp | 10 +++++----- src/keyboardconfig.cpp | 4 ++-- 11 files changed, 24 insertions(+), 24 deletions(-) (limited to 'src/gui/itempopup.cpp') diff --git a/src/effectmanager.h b/src/effectmanager.h index 0d694f4a..c69ade09 100644 --- a/src/effectmanager.h +++ b/src/effectmanager.h @@ -31,7 +31,7 @@ class Being; class EffectManager { - public: + public: struct EffectDescription { int id; diff --git a/src/game.cpp b/src/game.cpp index 9552c2ef..9b11fad2 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -548,9 +548,9 @@ void Game::handleInput() keyboard.isKeyActive(keyboard.KEY_OK)) npcIntegerDialog->action(gcn::ActionEvent(NULL, "ok")); else if (!(keyboard.getKeyValue( - KeyboardConfig::KEY_TOGGLE_CHAT) == + KeyboardConfig::KEY_TOGGLE_CHAT) == keyboard.getKeyValue( - KeyboardConfig::KEY_OK) && + KeyboardConfig::KEY_OK) && (npcStringDialog->isVisible() || npcTextDialog->isVisible() || npcListDialog->isVisible() || @@ -593,7 +593,7 @@ void Game::handleInput() break; // Quitting confirmation dialog case KeyboardConfig::KEY_QUIT: - if (!exitConfirm) + if (!exitConfirm) { exitConfirm = new ConfirmDialog( _("Quit"), _("Are you sure you " diff --git a/src/gui/itempopup.cpp b/src/gui/itempopup.cpp index f589286b..d13cd1c2 100644 --- a/src/gui/itempopup.cpp +++ b/src/gui/itempopup.cpp @@ -109,7 +109,7 @@ void ItemPopup::setItem(const ItemInfo &item) mItemName->setWidth(boldFont->getWidth(item.getName())); mItemDesc->setTextWrapped(item.getDescription(), 196); mItemEffect->setTextWrapped(item.getEffect(), 196); - mItemWeight->setTextWrapped(_("Weight: ") + toString(item.getWeight()) + + mItemWeight->setTextWrapped(_("Weight: ") + toString(item.getWeight()) + _(" grams"), 196); int minWidth = mItemName->getWidth(); @@ -139,7 +139,7 @@ void ItemPopup::setItem(const ItemInfo &item) if (item.getEffect().empty()) { - setContentSize(minWidth, (numRowsDesc * getFont()->getHeight() + + setContentSize(minWidth, (numRowsDesc * getFont()->getHeight() + (3 * getFont()->getHeight()))); mItemWeightScroll->setPosition(2, @@ -148,7 +148,7 @@ void ItemPopup::setItem(const ItemInfo &item) } else { - setContentSize(minWidth, (numRowsDesc * getFont()->getHeight()) + + setContentSize(minWidth, (numRowsDesc * getFont()->getHeight()) + (numRowsEffect * getFont()->getHeight()) + (3 * getFont()->getHeight())); diff --git a/src/gui/minimap.cpp b/src/gui/minimap.cpp index 5c52b38e..80c95dd7 100644 --- a/src/gui/minimap.cpp +++ b/src/gui/minimap.cpp @@ -76,7 +76,7 @@ void Minimap::setMapImage(Image *img) setMinWidth(mapWidth > titleWidth ? mapWidth : titleWidth); setMinHeight(mapHeight); - setMaxWidth(mMapImage->getWidth() > titleWidth ? + setMaxWidth(mMapImage->getWidth() > titleWidth ? mMapImage->getWidth() + offsetX : titleWidth); setMaxHeight(mMapImage->getHeight() + offsetY); diff --git a/src/gui/recorder.cpp b/src/gui/recorder.cpp index 032b9790..982d808d 100644 --- a/src/gui/recorder.cpp +++ b/src/gui/recorder.cpp @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with The Mana World; if not, write to the Free Software + * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ @@ -40,7 +40,7 @@ Recorder::Recorder(ChatWindow *chat, const std::string &title, mChat = chat; Button *button = new Button(buttonTxt, "activate", this); - setDefaultSize(0, windowContainer->getHeight() - 123 - button->getHeight() - + setDefaultSize(0, windowContainer->getHeight() - 123 - button->getHeight() - offsetY, button->getWidth() + offsetX, button->getHeight() + offsetY); @@ -99,7 +99,7 @@ void Recorder::changeRecordingStatus(const std::string &msg) */ mChat->chatLog(_("Starting to record..."), BY_SERVER); std::string file = std::string(PHYSFS_getUserDir()) + "/.aethyra/" + msgCopy; - + mStream.open(file.c_str(), std::ios_base::trunc); if (mStream.is_open()) @@ -113,4 +113,3 @@ void Recorder::action(const gcn::ActionEvent &event) { changeRecordingStatus(""); } - diff --git a/src/gui/setup_players.cpp b/src/gui/setup_players.cpp index 0ea6d167..d9dc47c8 100644 --- a/src/gui/setup_players.cpp +++ b/src/gui/setup_players.cpp @@ -241,7 +241,7 @@ Setup_Players::Setup_Players(): mIgnoreActionChoicesBox = new DropDown(ignoreChoices, new ScrollArea(), new ListBox(ignoreChoices), false); - for (int i = 0; i < COLUMNS_NR; i++) + for (int i = 0; i < COLUMNS_NR; i++) { mPlayerTableTitleModel->set(0, i, new gcn::Label(gettext(table_titles[i]))); diff --git a/src/gui/setup_players.h b/src/gui/setup_players.h index 07f70b00..46eae0db 100644 --- a/src/gui/setup_players.h +++ b/src/gui/setup_players.h @@ -32,8 +32,9 @@ class GuiTable; class PlayerTableModel; class StaticTableModel; -class Setup_Players : public SetupTab, - public gcn::ActionListener, public PlayerRelationsListener +class Setup_Players : public SetupTab, + public gcn::ActionListener, + public PlayerRelationsListener { public: Setup_Players(); diff --git a/src/gui/shortcutwindow.cpp b/src/gui/shortcutwindow.cpp index 754b410a..cd9bc65f 100644 --- a/src/gui/shortcutwindow.cpp +++ b/src/gui/shortcutwindow.cpp @@ -51,7 +51,7 @@ ShortcutWindow::ShortcutWindow(const char *title, ShortcutContainer *content) const int width = (int) config.getValue("screenwidth", 800); const int height = (int) config.getValue("screenheight", 600); - setDefaultSize(width - (mInstances * mItems->getBoxWidth()) - + setDefaultSize(width - (mInstances * mItems->getBoxWidth()) - (mInstances * border), height - (mItems->getBoxHeight() * mItems->getMaxItems()) - border, mItems->getBoxWidth() + border, (mItems->getBoxHeight() * mItems->getMaxItems()) + diff --git a/src/gui/status.cpp b/src/gui/status.cpp index 5547b996..42a48b2f 100644 --- a/src/gui/status.cpp +++ b/src/gui/status.cpp @@ -130,7 +130,7 @@ StatusWindow::StatusWindow(LocalPlayer *player): place(0, 0, mStatsTitleLabel, 5); place(5, 1, mStatsTotalLabel, 5); place(12, 1, mStatsCostLabel, 5); - for(int i = 0; i < 6; i++) + for (int i = 0; i < 6; i++) { place(0, 2 + i, mStatsLabel[i], 7).setPadding(5); place(7, 2 + i, mStatsDisplayLabel[i]).setPadding(5); diff --git a/src/gui/widgets/tab.cpp b/src/gui/widgets/tab.cpp index 1562e3f2..263e5bbd 100644 --- a/src/gui/widgets/tab.cpp +++ b/src/gui/widgets/tab.cpp @@ -52,10 +52,10 @@ struct TabData }; static TabData const data[TAB_COUNT] = { - {"graphics/gui/tab.png", 0, 0}, - {"graphics/gui/tab.png", 9, 4}, - {"graphics/gui/tabselected.png", 16, 19}, - {"graphics/gui/tab.png", 25, 23} + { "graphics/gui/tab.png", 0, 0 }, + { "graphics/gui/tab.png", 9, 4 }, + { "graphics/gui/tabselected.png", 16, 19 }, + { "graphics/gui/tab.png", 25, 23 } }; ImageRect Tab::tabImg[TAB_COUNT]; @@ -118,7 +118,7 @@ void Tab::draw(gcn::Graphics *graphics) // check which type of tab to draw if (mTabbedArea) { - if(mTabbedArea->isTabSelected(this)) + if (mTabbedArea->isTabSelected(this)) { mode = TAB_SELECTED; // if tab is selected, it doesnt need to highlight activity diff --git a/src/keyboardconfig.cpp b/src/keyboardconfig.cpp index b75a3c1c..1976e803 100644 --- a/src/keyboardconfig.cpp +++ b/src/keyboardconfig.cpp @@ -151,8 +151,8 @@ bool KeyboardConfig::hasConflicts() for (j = i, j++; j < KEY_TOTAL; j++) { // Allow for item shortcut and emote keys to overlap, but no other keys - if (!((((i >= KEY_SHORTCUT_1) && (i <= KEY_SHORTCUT_12)) && - ((j >= KEY_EMOTE_1) && (j <= KEY_EMOTE_12))) || + if (!((((i >= KEY_SHORTCUT_1) && (i <= KEY_SHORTCUT_12)) && + ((j >= KEY_EMOTE_1) && (j <= KEY_EMOTE_12))) || ((i == KEY_TOGGLE_CHAT) && (j == KEY_OK))) && (mKey[i].value == mKey[j].value) ) -- cgit v1.2.3-70-g09d2