diff --git a/src/windows/voicewindow.cpp b/src/windows/voicewindow.cpp index 18f4a41..1e00f90 100644 --- a/src/windows/voicewindow.cpp +++ b/src/windows/voicewindow.cpp @@ -91,6 +91,7 @@ VoiceWindow::VoiceWindow(Snowflake channel_id) , m_deafen("Deafen") , m_noise_suppression("Suppress Noise") , m_mix_mono("Mix Mono") + , m_disconnect("Disconnect") , m_channel_id(channel_id) , m_menu_view("View") , m_menu_view_settings("More _Settings", true) { @@ -185,6 +186,10 @@ VoiceWindow::VoiceWindow(Snowflake channel_id) Abaddon::Get().GetAudio().SetMixMono(m_mix_mono.get_active()); }); + m_disconnect.signal_clicked().connect([this]() { + Abaddon::Get().GetDiscordClient().DisconnectFromVoice(); + }); + auto *playback_renderer = Gtk::make_managed(); m_playback_combo.set_valign(Gtk::ALIGN_END); m_playback_combo.set_hexpand(true); @@ -253,6 +258,7 @@ VoiceWindow::VoiceWindow(Snowflake channel_id) m_controls.add(m_deafen); m_controls.add(m_noise_suppression); m_controls.add(m_mix_mono); + m_controls.pack_end(m_disconnect, false, true); m_main.pack_start(m_menu_bar, false, true); m_main.pack_start(m_controls, false, true); m_main.pack_start(m_vad_value, false, true); diff --git a/src/windows/voicewindow.hpp b/src/windows/voicewindow.hpp index 018934b..fb64010 100644 --- a/src/windows/voicewindow.hpp +++ b/src/windows/voicewindow.hpp @@ -56,6 +56,8 @@ private: Gtk::CheckButton m_noise_suppression; Gtk::CheckButton m_mix_mono; + Gtk::Button m_disconnect; + Gtk::ComboBoxText m_vad_combo; Gtk::ComboBox m_playback_combo; Gtk::ComboBox m_capture_combo;