Skip to content
Snippets Groups Projects
Commit 8fde32b7 authored by Emmanuel Milou's avatar Emmanuel Milou
Browse files

[#3620] Display incoming message in a GNOME notification

parent 23fb1217
Branches
Tags
No related merge requests found
...@@ -124,7 +124,14 @@ incoming_message_cb(DBusGProxy *proxy UNUSED, const gchar* callID UNUSED, ...@@ -124,7 +124,14 @@ incoming_message_cb(DBusGProxy *proxy UNUSED, const gchar* callID UNUSED,
const gchar* msg, void * foo UNUSED ) const gchar* msg, void * foo UNUSED )
{ {
DEBUG ("Message %s!",msg); DEBUG ("Message %s!",msg);
// Get the call information. Does this call exist?
callable_obj_t * c = calllist_get (current_calls, callID);
if (c) {
notify_incoming_message (callID, msg); notify_incoming_message (callID, msg);
} else {
ERROR ("Message received, but no recipient found");
}
} }
static void static void
......
...@@ -74,11 +74,10 @@ notify_incoming_message (const gchar *callID, const gchar *msg) ...@@ -74,11 +74,10 @@ notify_incoming_message (const gchar *callID, const gchar *msg)
gchar* text; gchar* text;
gchar* title; gchar* title;
title = g_markup_printf_escaped(_("New message")); title = g_markup_printf_escaped(_("%s says:"), callID);
text = g_markup_printf_escaped (_("%s says: %s"), callID, msg);
create_new_gnome_notification (title, create_new_gnome_notification (title,
text, msg,
NOTIFY_URGENCY_CRITICAL, NOTIFY_URGENCY_CRITICAL,
(g_strcasecmp(__TIMEOUT_MODE, "default") == 0 )? __TIMEOUT_TIME : NOTIFY_EXPIRES_NEVER, (g_strcasecmp(__TIMEOUT_MODE, "default") == 0 )? __TIMEOUT_TIME : NOTIFY_EXPIRES_NEVER,
&_gnome_notification); &_gnome_notification);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment