From 79de445e7b21747cbc7893737a5d6756da184274 Mon Sep 17 00:00:00 2001 From: Danielle Madeley Date: Thu, 4 Aug 2011 12:14:11 +1000 Subject: Support smileys in log viewer --- libempathy-gtk/empathy-log-window.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c index f81ea4cfe..8869d4acd 100644 --- a/libempathy-gtk/empathy-log-window.c +++ b/libempathy-gtk/empathy-log-window.c @@ -47,6 +47,7 @@ #include #include #include +#include #include #include #include @@ -121,6 +122,8 @@ struct _EmpathyLogWindowPriv TpAccount *selected_account; gchar *selected_chat_id; gboolean selected_is_chatroom; + + GSettings *gsettings_chat; }; static void log_window_search_entry_changed_cb (GtkWidget *entry, @@ -546,6 +549,7 @@ empathy_log_window_dispose (GObject *object) tp_clear_object (&self->priv->selected_account); tp_clear_object (&self->priv->selected_contact); tp_clear_object (&self->priv->camera_monitor); + tp_clear_object (&self->priv->gsettings_chat); G_OBJECT_CLASS (empathy_log_window_parent_class)->dispose (object); } @@ -594,6 +598,8 @@ empathy_log_window_init (EmpathyLogWindow *self) self->priv->log_manager = tpl_log_manager_dup_singleton (); + self->priv->gsettings_chat = g_settings_new (EMPATHY_PREFS_CHAT_SCHEMA); + gtk_window_set_title (GTK_WINDOW (self), _("History")); gtk_widget_set_can_focus (GTK_WIDGET (self), FALSE); gtk_window_set_default_size (GTK_WINDOW (self), 800, 600); @@ -1290,8 +1296,9 @@ log_window_append_chat_message (TplEvent *event, // } /* escape the text */ - // FIXME: handle smileys - parsers = empathy_webkit_get_string_parser (FALSE); + parsers = empathy_webkit_get_string_parser ( + g_settings_get_boolean (log_window->priv->gsettings_chat, + EMPATHY_PREFS_CHAT_SHOW_SMILEYS)); msg = g_string_new (""); empathy_string_parser_substr (empathy_message_get_body (message), -1, -- cgit v1.2.3