return FALSE;
}
- gdk_window_get_pointer (win, &x, &y, NULL);
+ gdk_window_get_device_position (win, event->device, &x, &y, NULL);
/* Get the iter where the cursor is at */
gtk_text_view_window_to_buffer_coords (GTK_TEXT_VIEW (view), type,
table = gtk_text_buffer_get_tag_table (priv->buffer);
tag = gtk_text_tag_table_lookup (table, EMPATHY_CHAT_TEXT_VIEW_TAG_LINK);
- gtk_widget_get_pointer (GTK_WIDGET (view), &x, &y);
+ gdk_window_get_device_position (gtk_widget_get_window (GTK_WIDGET (view)),
+ gdk_device_manager_get_client_pointer (gdk_display_get_device_manager (
+ gtk_widget_get_display (GTK_WIDGET (view)))), &x, &y, NULL);
gtk_text_view_window_to_buffer_coords (GTK_TEXT_VIEW (view),
GTK_TEXT_WINDOW_WIDGET,
/* Append date if needed */
if (show_date) {
- GDateTime *date;
-
- date = g_date_time_new_from_unix_utc (timestamp);
/* Translators: timestamp displayed between conversations in
* chat windows (strftime format string) */
- tmp = g_date_time_format (date, _("%A %B %d %Y"));
+ tmp = empathy_time_to_string_utc (timestamp, _("%A %B %d %Y"));
g_string_append (str, tmp);
g_string_append (str, ", ");
- g_date_time_unref (date);
g_free (tmp);
}
/* Get the date of the message we are appending */
date = g_date_time_new_from_unix_utc (timestamp);
- delta = g_date_time_difference (last_date, date);
+ delta = g_date_time_difference (date, last_date);
/* If last message was from another day we append date and time */
if (delta >= G_TIME_SPAN_DAY) {
append_date = TRUE;
static void
chat_text_view_append_message (EmpathyChatView *view,
- EmpathyMessage *msg)
+ EmpathyMessage *msg,
+ gboolean should_highlight)
{
EmpathyChatTextView *text_view = EMPATHY_CHAT_TEXT_VIEW (view);
EmpathyChatTextViewPriv *priv = GET_PRIV (text_view);
chat_text_maybe_append_date_and_time (text_view, timestamp);
if (EMPATHY_CHAT_TEXT_VIEW_GET_CLASS (view)->append_message) {
EMPATHY_CHAT_TEXT_VIEW_GET_CLASS (view)->append_message (text_view,
- msg);
+ msg,
+ should_highlight);
}
if (bottom) {