summaryrefslogtreecommitdiff
path: root/src/components/channels.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/channels.hpp')
-rw-r--r--src/components/channels.hpp33
1 files changed, 32 insertions, 1 deletions
diff --git a/src/components/channels.hpp b/src/components/channels.hpp
index da006dc..36c7766 100644
--- a/src/components/channels.hpp
+++ b/src/components/channels.hpp
@@ -52,6 +52,9 @@ protected:
void OnThreadUpdate(const ThreadUpdateData &data);
void OnThreadListSync(const ThreadListSyncData &data);
+ void OnVoiceUserConnect(Snowflake user_id, Snowflake channel_id);
+ void OnVoiceUserDisconnect(Snowflake user_id, Snowflake channel_id);
+
Gtk::TreeView m_view;
class ModelColumns : public Gtk::TreeModel::ColumnRecord {
@@ -87,7 +90,8 @@ protected:
// separation necessary because a channel and guild can share the same id
Gtk::TreeModel::iterator GetIteratorForTopLevelFromID(Snowflake id);
Gtk::TreeModel::iterator GetIteratorForGuildFromID(Snowflake id);
- Gtk::TreeModel::iterator GetIteratorForChannelFromID(Snowflake id);
+ Gtk::TreeModel::iterator GetIteratorForRowFromID(Snowflake id);
+ Gtk::TreeModel::iterator GetIteratorForRowFromIDOfType(Snowflake id, RenderType type);
bool IsTextChannel(ChannelType type);
@@ -132,10 +136,20 @@ protected:
Gtk::MenuItem m_menu_channel_open_tab;
#endif
+#ifdef WITH_VOICE
+ Gtk::Menu m_menu_voice_channel;
+ Gtk::MenuItem m_menu_voice_channel_join;
+ Gtk::MenuItem m_menu_voice_channel_disconnect;
+#endif
+
Gtk::Menu m_menu_dm;
Gtk::MenuItem m_menu_dm_copy_id;
Gtk::MenuItem m_menu_dm_close;
Gtk::MenuItem m_menu_dm_toggle_mute;
+#ifdef WITH_VOICE
+ Gtk::MenuItem m_menu_dm_join_voice;
+ Gtk::MenuItem m_menu_dm_disconnect_voice;
+#endif
#ifdef WITH_LIBHANDY
Gtk::MenuItem m_menu_dm_open_tab;
@@ -155,6 +169,10 @@ protected:
void OnDMSubmenuPopup();
void OnThreadSubmenuPopup();
+#ifdef WITH_VOICE
+ void OnVoiceChannelSubmenuPopup();
+#endif
+
bool m_updating_listing = false;
Snowflake m_active_channel;
@@ -174,6 +192,14 @@ public:
type_signal_action_open_new_tab signal_action_open_new_tab();
#endif
+#ifdef WITH_VOICE
+ using type_signal_action_join_voice_channel = sigc::signal<void, Snowflake>;
+ using type_signal_action_disconnect_voice = sigc::signal<void>;
+
+ type_signal_action_join_voice_channel signal_action_join_voice_channel();
+ type_signal_action_disconnect_voice signal_action_disconnect_voice();
+#endif
+
type_signal_action_channel_item_select signal_action_channel_item_select();
type_signal_action_guild_leave signal_action_guild_leave();
type_signal_action_guild_settings signal_action_guild_settings();
@@ -186,4 +212,9 @@ private:
#ifdef WITH_LIBHANDY
type_signal_action_open_new_tab m_signal_action_open_new_tab;
#endif
+
+#ifdef WITH_VOICE
+ type_signal_action_join_voice_channel m_signal_action_join_voice_channel;
+ type_signal_action_disconnect_voice m_signal_action_disconnect_voice;
+#endif
};