summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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.
*