summaryrefslogtreecommitdiff
path: root/abaddon.cpp
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2020-09-03 02:32:28 -0400
committerouwou <26526779+ouwou@users.noreply.github.com>2020-09-03 02:32:28 -0400
commit5e8489d21974daf325ba7782ac3b2ccec88518df (patch)
tree4b07223061a50b35b0e52701529c807410218529 /abaddon.cpp
parent2fab0c3e0df870378055fe2f66f3b37f7d0929fc (diff)
downloadabaddon-portaudio-5e8489d21974daf325ba7782ac3b2ccec88518df.tar.gz
abaddon-portaudio-5e8489d21974daf325ba7782ac3b2ccec88518df.zip
add active chat to main window title
Diffstat (limited to 'abaddon.cpp')
-rw-r--r--abaddon.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/abaddon.cpp b/abaddon.cpp
index 51d8157..ef0580d 100644
--- a/abaddon.cpp
+++ b/abaddon.cpp
@@ -32,7 +32,7 @@ int Abaddon::StartGTK() {
m_main_window = std::make_unique<MainWindow>();
m_main_window->SetAbaddon(this);
- m_main_window->set_title("Abaddon");
+ m_main_window->set_title(APP_TITLE);
m_main_window->show();
m_main_window->UpdateComponents();
@@ -106,6 +106,7 @@ void Abaddon::ActionConnect() {
void Abaddon::ActionDisconnect() {
if (m_discord.IsStarted())
StopDiscord();
+ m_main_window->set_title(APP_TITLE);
m_main_window->UpdateComponents();
}
@@ -167,6 +168,8 @@ void Abaddon::ActionCopyGuildID(Snowflake id) {
}
void Abaddon::ActionListChannelItemClick(Snowflake id) {
+ auto *channel = m_discord.GetChannel(id);
+ m_main_window->set_title(std::string(APP_TITLE) + " - #" + channel->Name);
m_main_window->UpdateChatActiveChannel(id);
if (m_channels_requested.find(id) == m_channels_requested.end()) {
m_discord.FetchMessagesInChannel(id, [this, id](const std::vector<MessageData> &msgs) {