summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-12 13:20:31 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-12 13:20:31 +0300
commit3121b17f34cb74e1b54ef5bde8b3937627d79d91 (patch)
tree2893523b8bc4d2b599e45bd2caf7b2122b0e6fe5 /src
parentbd7a4a6eb33606a4519cc022c9ff524238a31111 (diff)
downloadplus-3121b17f34cb74e1b54ef5bde8b3937627d79d91.tar.gz
plus-3121b17f34cb74e1b54ef5bde8b3937627d79d91.tar.bz2
plus-3121b17f34cb74e1b54ef5bde8b3937627d79d91.tar.xz
plus-3121b17f34cb74e1b54ef5bde8b3937627d79d91.zip
Rename guildchattab into emulateguildtab.
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt4
-rw-r--r--src/Makefile.am4
-rw-r--r--src/gui/widgets/tabs/chat/emulateguildtab.cpp (renamed from src/gui/widgets/tabs/chat/guildchattab.cpp)22
-rw-r--r--src/gui/widgets/tabs/chat/emulateguildtab.h (renamed from src/gui/widgets/tabs/chat/guildchattab.h)18
-rw-r--r--src/guildmanager.cpp4
-rw-r--r--src/guildmanager.h4
6 files changed, 28 insertions, 28 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index f88213bb5..43a9f748b 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -170,10 +170,10 @@ SET(SRCS
gui/models/langlistmodel.h
gui/widgets/flowcontainer.cpp
gui/widgets/flowcontainer.h
+ gui/widgets/tabs/chat/emulateguildtab.cpp
+ gui/widgets/tabs/chat/emulateguildtab.h
gui/widgets/tabs/chat/gmtab.cpp
gui/widgets/tabs/chat/gmtab.h
- gui/widgets/tabs/chat/guildchattab.cpp
- gui/widgets/tabs/chat/guildchattab.h
gui/widgets/horizontcontainer.cpp
gui/widgets/horizontcontainer.h
gui/widgets/icon.cpp
diff --git a/src/Makefile.am b/src/Makefile.am
index 3693d270e..aed69a54d 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -292,10 +292,10 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \
gui/models/langlistmodel.h \
gui/widgets/flowcontainer.cpp \
gui/widgets/flowcontainer.h \
+ gui/widgets/tabs/chat/emulateguildtab.cpp \
+ gui/widgets/tabs/chat/emulateguildtab.h \
gui/widgets/tabs/chat/gmtab.cpp \
gui/widgets/tabs/chat/gmtab.h \
- gui/widgets/tabs/chat/guildchattab.cpp \
- gui/widgets/tabs/chat/guildchattab.h \
gui/widgets/guitable.cpp \
gui/widgets/guitable.h \
gui/widgets/horizontcontainer.cpp \
diff --git a/src/gui/widgets/tabs/chat/guildchattab.cpp b/src/gui/widgets/tabs/chat/emulateguildtab.cpp
index 8a261c6de..9c8eb7085 100644
--- a/src/gui/widgets/tabs/chat/guildchattab.cpp
+++ b/src/gui/widgets/tabs/chat/emulateguildtab.cpp
@@ -20,7 +20,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "gui/widgets/tabs/chat/guildchattab.h"
+#include "gui/widgets/tabs/chat/emulateguildtab.h"
#include "chatlogger.h"
#include "configuration.h"
@@ -34,7 +34,7 @@
#include "debug.h"
-GuildChatTab::GuildChatTab(const Widget2 *const widget) :
+EmulateGuildTab::EmulateGuildTab(const Widget2 *const widget) :
// TRANSLATORS: guild chat tab name
ChatTab(widget, _("Guild"), "")
{
@@ -48,14 +48,14 @@ GuildChatTab::GuildChatTab(const Widget2 *const widget) :
config.addListener("showGuildOnline", this);
}
-GuildChatTab::~GuildChatTab()
+EmulateGuildTab::~EmulateGuildTab()
{
config.removeListeners(this);
CHECKLISTENERS
}
-bool GuildChatTab::handleCommand(const std::string &restrict type,
- const std::string &restrict args)
+bool EmulateGuildTab::handleCommand(const std::string &restrict type,
+ const std::string &restrict args)
{
if (type == "invite" && guildManager)
guildManager->invite(args);
@@ -71,14 +71,14 @@ bool GuildChatTab::handleCommand(const std::string &restrict type,
return true;
}
-void GuildChatTab::handleInput(const std::string &msg)
+void EmulateGuildTab::handleInput(const std::string &msg)
{
if (!guildManager)
return;
guildManager->chat(ChatWindow::doReplace(msg));
}
-void GuildChatTab::getAutoCompleteList(StringVect &names) const
+void EmulateGuildTab::getAutoCompleteList(StringVect &names) const
{
if (!guildManager)
return;
@@ -86,7 +86,7 @@ void GuildChatTab::getAutoCompleteList(StringVect &names) const
guildManager->getNames(names);
}
-void GuildChatTab::getAutoCompleteCommands(StringVect &names) const
+void EmulateGuildTab::getAutoCompleteCommands(StringVect &names) const
{
names.push_back("/help");
names.push_back("/invite ");
@@ -95,18 +95,18 @@ void GuildChatTab::getAutoCompleteCommands(StringVect &names) const
names.push_back("/notice ");
}
-void GuildChatTab::saveToLogFile(const std::string &msg) const
+void EmulateGuildTab::saveToLogFile(const std::string &msg) const
{
if (chatLogger)
chatLogger->log("#Guild", msg);
}
-void GuildChatTab::playNewMessageSound() const
+void EmulateGuildTab::playNewMessageSound() const
{
soundManager.playGuiSound(SOUND_GUILD);
}
-void GuildChatTab::optionChanged(const std::string &value)
+void EmulateGuildTab::optionChanged(const std::string &value)
{
if (value == "showGuildOnline")
mShowOnline = config.getBoolValue("showGuildOnline");
diff --git a/src/gui/widgets/tabs/chat/guildchattab.h b/src/gui/widgets/tabs/chat/emulateguildtab.h
index 3af652928..f614fb092 100644
--- a/src/gui/widgets/tabs/chat/guildchattab.h
+++ b/src/gui/widgets/tabs/chat/emulateguildtab.h
@@ -20,24 +20,24 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef GUI_WIDGETS_TABS_CHAT_GUILDCHATTAB_H
-#define GUI_WIDGETS_TABS_CHAT_GUILDCHATTAB_H
+#ifndef GUI_WIDGETS_TABS_CHAT_EMULATEGUILDTAB_H
+#define GUI_WIDGETS_TABS_CHAT_EMULATEGUILDTAB_H
#include "gui/widgets/tabs/chat/chattab.h"
#include "gui/widgets/tabs/chat/chattabtype.h"
/**
- * A tab for a guild chat channel.
+ * Emulate guild tab, because server not support normal guilds.
*/
-class GuildChatTab final : public ChatTab,
- public ConfigListener
+class EmulateGuildTab final : public ChatTab,
+ public ConfigListener
{
public:
- explicit GuildChatTab(const Widget2 *const widget);
+ explicit EmulateGuildTab(const Widget2 *const widget);
- A_DELETE_COPY(GuildChatTab)
+ A_DELETE_COPY(EmulateGuildTab)
- ~GuildChatTab();
+ ~EmulateGuildTab();
bool handleCommand(const std::string &restrict type,
const std::string &restrict args) override final;
@@ -59,4 +59,4 @@ class GuildChatTab final : public ChatTab,
void getAutoCompleteCommands(StringVect &names) const override final;
};
-#endif // GUI_WIDGETS_TABS_CHAT_GUILDCHATTAB_H
+#endif // GUI_WIDGETS_TABS_CHAT_EMULATEGUILDTAB_H
diff --git a/src/guildmanager.cpp b/src/guildmanager.cpp
index 0bde0b5bb..bd3e9b745 100644
--- a/src/guildmanager.cpp
+++ b/src/guildmanager.cpp
@@ -31,7 +31,7 @@
#include "gui/windows/chatwindow.h"
#include "gui/windows/socialwindow.h"
-#include "gui/widgets/tabs/chat/guildchattab.h"
+#include "gui/widgets/tabs/chat/emulateguildtab.h"
#include "net/chathandler.h"
#include "net/packetlimiter.h"
@@ -229,7 +229,7 @@ void GuildManager::createTab(Guild *const guild)
{
if (!mTab)
{
- mTab = new GuildChatTab(chatWindow);
+ mTab = new EmulateGuildTab(chatWindow);
if (config.getBoolValue("showChatHistory"))
mTab->loadFromLogFile("#Guild");
if (localPlayer)
diff --git a/src/guildmanager.h b/src/guildmanager.h
index 4c7c80c4c..d3a8b9ab1 100644
--- a/src/guildmanager.h
+++ b/src/guildmanager.h
@@ -27,7 +27,7 @@
class ChatTab;
class Guild;
-class GuildChatTab;
+class EmulateGuildTab;
class GuildManager final
{
@@ -92,7 +92,7 @@ class GuildManager final
bool mSentNameRequest;
bool mHavePower;
StringVect mTempList;
- GuildChatTab *mTab;
+ EmulateGuildTab *mTab;
bool mRequest;
int mRequestTime;
bool mGotOnlineInfo;