]> git.0d.be Git - empathy.git/blobdiff - libempathy-gtk/empathy-theme-boxes.c
Merge commit 'staz/dnd'
[empathy.git] / libempathy-gtk / empathy-theme-boxes.c
index f5224278caace526613ea0891e515e5fa2b0ac06..e6a606de186ea4b5d3d08d1a704c661c65d16066 100644 (file)
@@ -193,12 +193,13 @@ theme_boxes_maybe_append_header (EmpathyThemeBoxes *theme,
        GtkTextChildAnchor   *anchor;
        GtkWidget            *box;
        gchar                *str;
-       time_t                time;
+       time_t                time_;
        gchar                *tmp;
        GtkTextIter           start;
        gboolean              color_set;
        GtkTextTagTable      *table;
        GtkTextTag           *tag;
+       GString              *str_obj;
 
        contact = empathy_message_get_sender (msg);
        name = empathy_contact_get_name (contact);
@@ -258,8 +259,8 @@ theme_boxes_maybe_append_header (EmpathyThemeBoxes *theme,
        g_free (str);
 
        /* Add the message receive time */
-       time = empathy_message_get_timestamp (msg);
-       tmp = empathy_time_to_string_local (time,
+       time_ = empathy_message_get_timestamp (msg);
+       tmp = empathy_time_to_string_local (time_,
                                           EMPATHY_TIME_FORMAT_DISPLAY_SHORT);
        str = g_strdup_printf ("<i>%s</i>", tmp);
        label2 = g_object_new (GTK_TYPE_LABEL,
@@ -267,6 +268,12 @@ theme_boxes_maybe_append_header (EmpathyThemeBoxes *theme,
                               "use-markup", TRUE,
                               "xalign", 1.0,
                               NULL);
+
+       str_obj = g_string_new ("\n- ");
+       g_string_append (str_obj, name);
+       g_string_append (str_obj, ", ");
+       g_string_append (str_obj, tmp);
+       g_string_append (str_obj, " -");
        g_free (tmp);
        g_free (str);
 
@@ -290,6 +297,10 @@ theme_boxes_maybe_append_header (EmpathyThemeBoxes *theme,
        gtk_box_pack_start (GTK_BOX (box), label2, TRUE, TRUE, 0);
 
        /* Add the header box to the text view */
+       g_object_set_data_full (G_OBJECT (box),
+                               "str_obj",
+                               g_string_free (str_obj, FALSE),
+                               g_free);
        gtk_text_view_add_child_at_anchor (GTK_TEXT_VIEW (view),
                                           box,
                                           anchor);