Commit d29ae95e authored by Nicolas Jager's avatar Nicolas Jager Committed by Guillaume Roguez
Browse files

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: default avatarGuillaume Roguez <guilaume.roguez@savoirfairelinux.com>
parent 58a76381
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
fill="#000000"
height="24"
viewBox="0 0 24 24"
width="24"
version="1.1"
id="svg3777"
sodipodi:docname="ic_audio_only_call_black_24px.svg"
inkscape:version="0.92.2 5c3e80d, 2017-08-06">
<metadata
id="metadata3783">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs3781" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1028"
id="namedview3779"
showgrid="false"
inkscape:zoom="34.875"
inkscape:cx="9.6893946"
inkscape:cy="10.914473"
inkscape:window-x="0"
inkscape:window-y="28"
inkscape:window-maximized="1"
inkscape:current-layer="svg3777" />
<path
d="M0 0h24v24H0z"
fill="none"
id="path3773" />
<path
d="M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z"
id="path3775" />
<path
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.54042286;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="M 23.079805,2.6318744 20.917696,4.7939838 V 3.5537494 c 0,-0.444621 -0.365927,-0.8105468 -0.810547,-0.8105468 h -6.486328 c -0.444621,0 -0.810547,0.3659264 -0.810547,0.8105468 v 5.4042968 c 0,0.44462 0.365925,0.810547 0.810547,0.810547 h 6.486328 c 0.444621,0 0.810547,-0.365926 0.810547,-0.810547 v -1.240234 l 2.162109,2.162109 z m -9.458984,0.6523438 h 6.486328 c 0.149843,0 0.269531,0.1196871 0.269531,0.2695312 V 6.0967182 L 20.837618,5.6357807 22.538789,3.9346088 V 8.5752342 L 20.37668,6.4150776 v 2.5429686 c 0,0.149843 -0.119688,0.269531 -0.269531,0.269531 h -6.486328 c -0.149845,0 -0.269532,-0.119687 -0.269532,-0.269531 V 3.5537494 c 0,-0.1498447 0.119686,-0.2695312 0.269532,-0.2695312 z"
id="path4954"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1.53149271;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 11.884824,10.476454 21.482679,1.7966362"
id="path5002"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
</svg>
......@@ -32,5 +32,6 @@
<file alias="invite">ic_person_add_black_24px.svg</file>
<file alias="temporary-item">ic_search_black_48px.svg</file>
<file alias="contact_requests_list_with_notification">ic_verified_user_black_24px_with_notification.svg</file>
<file alias="audio_only_call_start">ic_audio_only_call_black_24px.svg</file>
</gresource>
</gresources>
......@@ -55,6 +55,7 @@ struct _ChatViewPrivate
GtkWidget *button_close_chatview;
GtkWidget *button_placecall;
GtkWidget *button_add_to_conversations;
GtkWidget *button_place_audio_call;
GSettings *settings;
......@@ -140,6 +141,17 @@ placecall_clicked(ChatView *self)
priv->accountContainer_->info.conversationModel->placeCall(priv->conversation_->uid);
}
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)
{
......@@ -178,6 +190,7 @@ chat_view_init(ChatView *view)
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 @@ chat_view_class_init(ChatViewClass *klass)
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",
......
......@@ -53,6 +53,21 @@
<property name="pack-type">end</property>
</packing>
</child>
<child>
<object class="GtkButton" id="button_place_audio_call">
<property name="image">image_place_audio_only_call</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip-text" translatable="yes">Place audio-only call</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="button_add_to_conversations">
<property name="visible">True</property>
......@@ -124,4 +139,8 @@
<property name="visible">True</property>
<property name="resource">/cx/ring/RingGnome/call_start</property>
</object>
<object class="GtkImage" id="image_place_audio_only_call">
<property name="visible">True</property>
<property name="resource">/cx/ring/RingGnome/audio_only_call_start</property>
</object>
</interface>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment