]> git.0d.be Git - empathy.git/commitdiff
Use char* not EmpathyMessage in TpChat:send-error
authorWill Thompson <will.thompson@collabora.co.uk>
Mon, 31 Aug 2009 00:13:00 +0000 (01:13 +0100)
committerWill Thompson <will.thompson@collabora.co.uk>
Mon, 31 Aug 2009 00:17:49 +0000 (01:17 +0100)
The only consumer of this signal just extracts the body from the
EmpathyMessage. It will be easier to handle the SendError D-Bus signal
if we don't have to construct an EmpathyMessage from it.

libempathy-gtk/empathy-chat.c
libempathy/empathy-tp-chat.c

index a979c9e76203349645d5d30f4f460fef86f595c2..c08b49c3fbe7a21b22be279d24dff67eb490e34f 100644 (file)
@@ -523,7 +523,7 @@ chat_message_received_cb (EmpathyTpChat  *tp_chat,
 
 static void
 chat_send_error_cb (EmpathyTpChat          *tp_chat,
-                   EmpathyMessage         *message,
+                   const gchar            *message_body,
                    TpChannelTextSendError  error_code,
                    EmpathyChat            *chat)
 {
@@ -552,7 +552,7 @@ chat_send_error_cb (EmpathyTpChat          *tp_chat,
        }
 
        str = g_strdup_printf (_("Error sending message '%s': %s"),
-                              empathy_message_get_body (message),
+                              message_body,
                               error);
        empathy_chat_view_append_event (chat->view, str);
        g_free (str);
index 69057a87860214cb611ec2f308018fd7d6ada127..7953b69e2a3413b1949469433edf55e8604f73ba 100644 (file)
@@ -359,7 +359,8 @@ tp_chat_send_cb (TpChannel    *proxy,
 
        if (error) {
                DEBUG ("Error: %s", error->message);
-               g_signal_emit (chat, signals[SEND_ERROR], 0, message,
+               g_signal_emit (chat, signals[SEND_ERROR], 0,
+                              empathy_message_get_body (message),
                               TP_CHANNEL_TEXT_SEND_ERROR_UNKNOWN);
        }
 }
@@ -1168,9 +1169,9 @@ empathy_tp_chat_class_init (EmpathyTpChatClass *klass)
                              G_SIGNAL_RUN_LAST,
                              0,
                              NULL, NULL,
-                             _empathy_marshal_VOID__OBJECT_UINT,
+                             _empathy_marshal_VOID__STRING_UINT,
                              G_TYPE_NONE,
-                             2, EMPATHY_TYPE_MESSAGE, G_TYPE_UINT);
+                             2, G_TYPE_STRING, G_TYPE_UINT);
 
        signals[CHAT_STATE_CHANGED] =
                g_signal_new ("chat-state-changed",