From e7022216c6d3d3b75a3d0f18f81be234ae038c3e Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Thu, 14 Apr 2016 15:06:24 +0200 Subject: [PATCH] Small trick to display received file transfer message url in chat --- gtk/chat.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gtk/chat.c b/gtk/chat.c index 492d029be..ed48da7aa 100644 --- a/gtk/chat.c +++ b/gtk/chat.c @@ -180,6 +180,11 @@ void linphone_gtk_push_text(GtkWidget *w, const LinphoneAddress *from, g_object_set_data(G_OBJECT(w),"from_message",g_strdup(from_str)); } ms_free(from_str); + + if (!message) { + const char *external_body_url = linphone_chat_message_get_external_body_url(msg); + if (external_body_url) message = external_body_url; + } // Inserts message body and tags URIs as hypertext links if(message) { @@ -611,6 +616,8 @@ void linphone_gtk_text_received ( LinphoneCore *lc, LinphoneChatRoom *room, /*GtkNotebook *notebook= ( GtkNotebook * ) linphone_gtk_get_widget ( main_window,"viewswitch" );*/ const LinphoneAddress *from= linphone_chat_message_get_from ( msg ); + linphone_core_take_preview_snapshot(lc, "/home/viish/capture.jpg"); + w= ( GtkWidget* ) g_object_get_data ( G_OBJECT ( friendlist ),"chatview" ); if ( w!=NULL ) { /* Chat window opened */