summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tabs
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-13 00:08:07 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-13 00:08:07 +0300
commitc37ae6c52273c01f634a0635c5255319f385e7fb (patch)
tree7ea53420bdecd46d53df69ccbbe1253214ca9fca /src/gui/widgets/tabs
parent4642291e19a5a98d07c067baddf1b5fafbab943a (diff)
downloadmanaplus-c37ae6c52273c01f634a0635c5255319f385e7fb.tar.gz
manaplus-c37ae6c52273c01f634a0635c5255319f385e7fb.tar.bz2
manaplus-c37ae6c52273c01f634a0635c5255319f385e7fb.tar.xz
manaplus-c37ae6c52273c01f634a0635c5255319f385e7fb.zip
Add whisper tab and channel tab commands to autocomplete.
Diffstat (limited to 'src/gui/widgets/tabs')
-rw-r--r--src/gui/widgets/tabs/chat/channeltab.cpp6
-rw-r--r--src/gui/widgets/tabs/chat/channeltab.h3
-rw-r--r--src/gui/widgets/tabs/chat/whispertab.cpp5
-rw-r--r--src/gui/widgets/tabs/chat/whispertab.h4
4 files changed, 18 insertions, 0 deletions
diff --git a/src/gui/widgets/tabs/chat/channeltab.cpp b/src/gui/widgets/tabs/chat/channeltab.cpp
index 43ba86acf..6f7242578 100644
--- a/src/gui/widgets/tabs/chat/channeltab.cpp
+++ b/src/gui/widgets/tabs/chat/channeltab.cpp
@@ -72,3 +72,9 @@ bool ChannelTab::handleCommand(const std::string &restrict type,
return true;
}
+
+void ChannelTab::getAutoCompleteCommands(StringVect& commands) const
+{
+ commands.push_back("/close");
+ commands.push_back(mChannelName);
+}
diff --git a/src/gui/widgets/tabs/chat/channeltab.h b/src/gui/widgets/tabs/chat/channeltab.h
index 33ed49987..0bcfc425c 100644
--- a/src/gui/widgets/tabs/chat/channeltab.h
+++ b/src/gui/widgets/tabs/chat/channeltab.h
@@ -44,6 +44,9 @@ class ChannelTab final : public ChatTab
bool handleCommand(const std::string &restrict type,
const std::string &restrict args) override final;
+
+ void getAutoCompleteCommands(StringVect& commands)
+ const override final;
};
#endif // GUI_WIDGETS_TABS_CHAT_CHANNELTAB_H
diff --git a/src/gui/widgets/tabs/chat/whispertab.cpp b/src/gui/widgets/tabs/chat/whispertab.cpp
index e1740d808..20354cc69 100644
--- a/src/gui/widgets/tabs/chat/whispertab.cpp
+++ b/src/gui/widgets/tabs/chat/whispertab.cpp
@@ -115,6 +115,11 @@ void WhisperTab::getAutoCompleteList(StringVect &names) const
names.push_back(mNick);
}
+void WhisperTab::getAutoCompleteCommands(StringVect& commands) const
+{
+ commands.push_back("/close");
+}
+
void WhisperTab::setWhisperTabColors()
{
setTabColors(Theme::WHISPER_TAB);
diff --git a/src/gui/widgets/tabs/chat/whispertab.h b/src/gui/widgets/tabs/chat/whispertab.h
index 4e9f091df..2ad8ca03d 100644
--- a/src/gui/widgets/tabs/chat/whispertab.h
+++ b/src/gui/widgets/tabs/chat/whispertab.h
@@ -48,6 +48,10 @@ class WhisperTab final : public ChatTab
friend class ChatWindow;
void getAutoCompleteList(StringVect &names) const override final;
+
+ void getAutoCompleteCommands(StringVect& commands)
+ const override final;
+
/**
* Constructor.
*