*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301 USA
*
* Authors: Xavier Claessens <xclaesse@gmail.com>
*/
gtk_widget_get_size_request (box, NULL, &height);
width = allocation->width;
-
+
width -= \
gtk_text_view_get_right_margin (GTK_TEXT_VIEW (view)) - \
gtk_text_view_get_left_margin (GTK_TEXT_VIEW (view));
DEBUG ("Maybe add fancy header");
/* Only insert a header if the previously inserted block is not the same
- * as this one. This catches all the different cases:
+ * as this one.
*/
- if (last_contact && empathy_contact_equal (last_contact, contact)) {
+ if (empathy_contact_equal (last_contact, contact)) {
return;
}
/* Add the message receive time */
time = empathy_message_get_timestamp (msg);
- tmp = empathy_time_to_string_local (time,
+ 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,
NULL);
g_free (tmp);
g_free (str);
-
+
/* Set foreground color of labels to the same color than the header tag. */
table = gtk_text_buffer_get_tag_table (buffer);
tag = gtk_text_tag_table_lookup (table, EMPATHY_THEME_BOXES_TAG_HEADER);
g_object_get (tag, "foreground-set", &color_set, NULL);
if (color_set) {
- GdkColor color;
+ GdkColor *color;
+
g_object_get (tag, "foreground-gdk", &color, NULL);
- gtk_widget_modify_fg (label1, GTK_STATE_NORMAL, &color);
- gtk_widget_modify_fg (label2, GTK_STATE_NORMAL, &color);
+ gtk_widget_modify_fg (label1, GTK_STATE_NORMAL, color);
+ gtk_widget_modify_fg (label2, GTK_STATE_NORMAL, color);
+ gdk_color_free (color);
}
/* Pack labels into the box */
TP_CHANNEL_TEXT_MESSAGE_TYPE_ACTION) {
gchar *body;
- body = g_strdup_printf (" * %s %s",
+ body = g_strdup_printf (" * %s %s",
empathy_contact_get_name (sender),
empathy_message_get_body (message));
empathy_chat_text_view_append_body (EMPATHY_CHAT_TEXT_VIEW (view),
gpointer user_data)
{
EmpathyThemeBoxesPriv *priv = GET_PRIV (user_data);
-
+
empathy_conf_get_bool (conf, key, &priv->show_avatars);
}