diff options
-rw-r--r-- | src/empathy-chat-window.c | 7 | ||||
-rw-r--r-- | src/empathy-event-manager.c | 6 |
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); } |