diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2020-09-03 02:32:28 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2020-09-03 02:32:28 -0400 |
commit | 5e8489d21974daf325ba7782ac3b2ccec88518df (patch) | |
tree | 4b07223061a50b35b0e52701529c807410218529 /abaddon.cpp | |
parent | 2fab0c3e0df870378055fe2f66f3b37f7d0929fc (diff) | |
download | abaddon-portaudio-5e8489d21974daf325ba7782ac3b2ccec88518df.tar.gz abaddon-portaudio-5e8489d21974daf325ba7782ac3b2ccec88518df.zip |
add active chat to main window title
Diffstat (limited to 'abaddon.cpp')
-rw-r--r-- | abaddon.cpp | 5 |
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) { |