aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorDanielle Madeley <danielle.madeley@collabora.co.uk>2011-08-04 10:14:11 +0800
committerDanielle Madeley <danielle.madeley@collabora.co.uk>2011-08-04 10:14:11 +0800
commit79de445e7b21747cbc7893737a5d6756da184274 (patch)
tree01950d1e1da83be338101aa6e7e7da715ce13240 /libempathy-gtk
parent0f84b8fa5a7f061cb5f82ed489e22f15ae2bc7cc (diff)
downloadgsoc2013-empathy-79de445e7b21747cbc7893737a5d6756da184274.tar
gsoc2013-empathy-79de445e7b21747cbc7893737a5d6756da184274.tar.gz
gsoc2013-empathy-79de445e7b21747cbc7893737a5d6756da184274.tar.bz2
gsoc2013-empathy-79de445e7b21747cbc7893737a5d6756da184274.tar.lz
gsoc2013-empathy-79de445e7b21747cbc7893737a5d6756da184274.tar.xz
gsoc2013-empathy-79de445e7b21747cbc7893737a5d6756da184274.tar.zst
gsoc2013-empathy-79de445e7b21747cbc7893737a5d6756da184274.zip
Support smileys in log viewer
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-log-window.c11
1 files 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 <libempathy/empathy-camera-monitor.h>
#include <libempathy/empathy-chatroom-manager.h>
#include <libempathy/empathy-chatroom.h>
+#include <libempathy/empathy-gsettings.h>
#include <libempathy/empathy-message.h>
#include <libempathy/empathy-request-util.h>
#include <libempathy/empathy-utils.h>
@@ -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,