diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-10-13 00:08:07 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-10-13 00:08:07 +0300 |
commit | c37ae6c52273c01f634a0635c5255319f385e7fb (patch) | |
tree | 7ea53420bdecd46d53df69ccbbe1253214ca9fca /src/gui | |
parent | 4642291e19a5a98d07c067baddf1b5fafbab943a (diff) | |
download | plus-c37ae6c52273c01f634a0635c5255319f385e7fb.tar.gz plus-c37ae6c52273c01f634a0635c5255319f385e7fb.tar.bz2 plus-c37ae6c52273c01f634a0635c5255319f385e7fb.tar.xz plus-c37ae6c52273c01f634a0635c5255319f385e7fb.zip |
Add whisper tab and channel tab commands to autocomplete.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/widgets/tabs/chat/channeltab.cpp | 6 | ||||
-rw-r--r-- | src/gui/widgets/tabs/chat/channeltab.h | 3 | ||||
-rw-r--r-- | src/gui/widgets/tabs/chat/whispertab.cpp | 5 | ||||
-rw-r--r-- | src/gui/widgets/tabs/chat/whispertab.h | 4 |
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. * |