コード例 #1
0
void
empathy_chat_manager_undo_closed_chat (EmpathyChatManager *self,
    gint64 timestamp)
{
  EmpathyChatManagerPriv *priv = GET_PRIV (self);
  ChatData *data;

  data = g_queue_pop_tail (priv->closed_queue);

  if (data == NULL)
    return;

  DEBUG ("Removing %s from closed queue and starting a chat with: %s",
      data->room ? "room" : "contact", data->id);

  if (data->room)
    empathy_join_muc (data->account, data->id, timestamp);
  else if (data->sms)
    empathy_sms_contact_id (data->account, data->id, timestamp,
        NULL, NULL);
  else
    empathy_chat_with_contact_id (data->account, data->id, timestamp,
        NULL, NULL);

  g_signal_emit (self, signals[CLOSED_CHATS_CHANGED], 0,
      g_queue_get_length (priv->closed_queue));

  chat_data_free (data);
}
コード例 #2
0
void
empathy_chat_with_contact (EmpathyContact *contact,
    gint64 timestamp)
{
  empathy_chat_with_contact_id (
      empathy_contact_get_account (contact), empathy_contact_get_id (contact),
      timestamp, NULL, NULL);
}