mirror of
https://github.com/uowuo/abaddon.git
synced 2024-11-10 06:00:10 +00:00
add disconnect button to voice window as Per Special Request
This commit is contained in:
parent
96687f019e
commit
8215a8d39f
@ -91,6 +91,7 @@ VoiceWindow::VoiceWindow(Snowflake channel_id)
|
|||||||
, m_deafen("Deafen")
|
, m_deafen("Deafen")
|
||||||
, m_noise_suppression("Suppress Noise")
|
, m_noise_suppression("Suppress Noise")
|
||||||
, m_mix_mono("Mix Mono")
|
, m_mix_mono("Mix Mono")
|
||||||
|
, m_disconnect("Disconnect")
|
||||||
, m_channel_id(channel_id)
|
, m_channel_id(channel_id)
|
||||||
, m_menu_view("View")
|
, m_menu_view("View")
|
||||||
, m_menu_view_settings("More _Settings", true) {
|
, 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());
|
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<Gtk::CellRendererText>();
|
auto *playback_renderer = Gtk::make_managed<Gtk::CellRendererText>();
|
||||||
m_playback_combo.set_valign(Gtk::ALIGN_END);
|
m_playback_combo.set_valign(Gtk::ALIGN_END);
|
||||||
m_playback_combo.set_hexpand(true);
|
m_playback_combo.set_hexpand(true);
|
||||||
@ -253,6 +258,7 @@ VoiceWindow::VoiceWindow(Snowflake channel_id)
|
|||||||
m_controls.add(m_deafen);
|
m_controls.add(m_deafen);
|
||||||
m_controls.add(m_noise_suppression);
|
m_controls.add(m_noise_suppression);
|
||||||
m_controls.add(m_mix_mono);
|
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_menu_bar, false, true);
|
||||||
m_main.pack_start(m_controls, false, true);
|
m_main.pack_start(m_controls, false, true);
|
||||||
m_main.pack_start(m_vad_value, false, true);
|
m_main.pack_start(m_vad_value, false, true);
|
||||||
|
@ -56,6 +56,8 @@ private:
|
|||||||
Gtk::CheckButton m_noise_suppression;
|
Gtk::CheckButton m_noise_suppression;
|
||||||
Gtk::CheckButton m_mix_mono;
|
Gtk::CheckButton m_mix_mono;
|
||||||
|
|
||||||
|
Gtk::Button m_disconnect;
|
||||||
|
|
||||||
Gtk::ComboBoxText m_vad_combo;
|
Gtk::ComboBoxText m_vad_combo;
|
||||||
Gtk::ComboBox m_playback_combo;
|
Gtk::ComboBox m_playback_combo;
|
||||||
Gtk::ComboBox m_capture_combo;
|
Gtk::ComboBox m_capture_combo;
|
||||||
|
Loading…
Reference in New Issue
Block a user