allows to perform audio-only call
- add a new button inside the chatview for audio-only call.
- add ic_audio_only_call_black_24px.svg for the button.
note: this patch does not affect the behaviour. We still open the
video page when the call is in progress.
Change-Id: I49afea09c572093ee370752df6df56c3ddda7eb1
Reviewed-by: Guillaume Roguez <guilaume.roguez@savoirfairelinux.com>
diff --git a/src/chatview.cpp b/src/chatview.cpp
index 0e4d0c3..1c6968a 100644
--- a/src/chatview.cpp
+++ b/src/chatview.cpp
@@ -55,6 +55,7 @@
GtkWidget *button_close_chatview;
GtkWidget *button_placecall;
GtkWidget *button_add_to_conversations;
+ GtkWidget *button_place_audio_call;
GSettings *settings;
@@ -141,6 +142,17 @@
}
static void
+place_audio_call_clicked(ChatView *self)
+{
+ auto priv = CHAT_VIEW_GET_PRIVATE(self);
+
+ if (!priv->conversation_)
+ return;
+
+ priv->accountContainer_->info.conversationModel->placeAudioOnlyCall(priv->conversation_->uid);
+}
+
+static void
button_add_to_conversations_clicked(ChatView *self)
{
auto priv = CHAT_VIEW_GET_PRIVATE(self);
@@ -178,6 +190,7 @@
g_signal_connect(priv->button_close_chatview, "clicked", G_CALLBACK(hide_chat_view), view);
g_signal_connect_swapped(priv->button_placecall, "clicked", G_CALLBACK(placecall_clicked), view);
g_signal_connect_swapped(priv->button_add_to_conversations, "clicked", G_CALLBACK(button_add_to_conversations_clicked), view);
+ g_signal_connect_swapped(priv->button_place_audio_call, "clicked", G_CALLBACK(place_audio_call_clicked), view);
}
static void
@@ -195,6 +208,7 @@
gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS (klass), ChatView, button_close_chatview);
gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS (klass), ChatView, button_placecall);
gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS (klass), ChatView, button_add_to_conversations);
+ gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS (klass), ChatView, button_place_audio_call);
chat_view_signals[NEW_MESSAGES_DISPLAYED] = g_signal_new (
"new-interactions-displayed",