aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-06-18 00:19:00 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-06-18 00:19:00 +0800
commitd0a3c7a9e5052a5487e74fe70e0d1f40c6f904a3 (patch)
treef33384324e5db5eb4482084d73d4388fb83d4a00 /src
parent8f7597bb501d2e641b09f55769990df97576cd0f (diff)
downloadgsoc2013-empathy-d0a3c7a9e5052a5487e74fe70e0d1f40c6f904a3.tar
gsoc2013-empathy-d0a3c7a9e5052a5487e74fe70e0d1f40c6f904a3.tar.gz
gsoc2013-empathy-d0a3c7a9e5052a5487e74fe70e0d1f40c6f904a3.tar.bz2
gsoc2013-empathy-d0a3c7a9e5052a5487e74fe70e0d1f40c6f904a3.tar.lz
gsoc2013-empathy-d0a3c7a9e5052a5487e74fe70e0d1f40c6f904a3.tar.xz
gsoc2013-empathy-d0a3c7a9e5052a5487e74fe70e0d1f40c6f904a3.tar.zst
gsoc2013-empathy-d0a3c7a9e5052a5487e74fe70e0d1f40c6f904a3.zip
Remove 'new message from' from notification message (#586102). Based on a patch from Nicolo Chieffo
Diffstat (limited to 'src')
-rw-r--r--src/empathy-chat-window.c7
-rw-r--r--src/empathy-event-manager.c6
2 files changed, 5 insertions, 8 deletions
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index 9c2dbc490..118c7375e 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -910,7 +910,8 @@ chat_window_show_or_update_notification (EmpathyChatWindow *window,
EmpathyChat *chat)
{
EmpathyContact *sender;
- char *header, *escaped;
+ const gchar *header;
+ char *escaped;
const char *body;
GdkPixbuf *pixbuf;
NotificationData *cb_data;
@@ -932,8 +933,7 @@ chat_window_show_or_update_notification (EmpathyChatWindow *window,
cb_data->window = window;
sender = empathy_message_get_sender (message);
- header = g_strdup_printf (_("New message from %s"),
- empathy_contact_get_name (sender));
+ header = empathy_contact_get_name (sender);
body = empathy_message_get_body (message);
escaped = g_markup_escape_text (body, -1);
@@ -955,7 +955,6 @@ chat_window_show_or_update_notification (EmpathyChatWindow *window,
notify_notification_show (priv->notification, NULL);
g_object_unref (pixbuf);
- g_free (header);
g_free (escaped);
}
diff --git a/src/empathy-event-manager.c b/src/empathy-event-manager.c
index 81d98ef74..1ee619e58 100644
--- a/src/empathy-event-manager.c
+++ b/src/empathy-event-manager.c
@@ -409,7 +409,7 @@ event_manager_chat_message_received_cb (EmpathyTpChat *tp_chat,
EmpathyMessage *message, EventManagerApproval *approval)
{
EmpathyContact *sender;
- gchar *header;
+ const gchar *header;
const gchar *msg;
TpChannel *channel;
EventPriv *event;
@@ -426,8 +426,7 @@ event_manager_chat_message_received_cb (EmpathyTpChat *tp_chat,
}
sender = empathy_message_get_sender (message);
- header = g_strdup_printf (_("New message from %s"),
- empathy_contact_get_name (sender));
+ header = empathy_contact_get_name (sender);
msg = empathy_message_get_body (message);
channel = empathy_tp_chat_get_channel (tp_chat);
@@ -438,7 +437,6 @@ event_manager_chat_message_received_cb (EmpathyTpChat *tp_chat,
event_manager_add (approval->manager, sender, EMPATHY_IMAGE_NEW_MESSAGE, header,
msg, approval, event_text_channel_process_func, NULL);
- g_free (header);
empathy_sound_play (empathy_main_window_get (),
EMPATHY_SOUND_CONVERSATION_NEW);
}