[empathy: 13/28] Use this utility in the log viewer
- From: Danielle Madeley <daniellem src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy: 13/28] Use this utility in the log viewer
- Date: Thu, 18 Aug 2011 00:35:53 +0000 (UTC)
commit a23b86b6a47b06cc9b37cafd892b73229c2d97d3
Author: Danielle Madeley <danielle madeley collabora co uk>
Date: Tue Aug 9 11:41:11 2011 +1000
Use this utility in the log viewer
It should also be used for the Adium theme, but this also supports fonts
specified in the Adium theme, which we need to support.
data/empathy-log-window.html | 7 +++++--
libempathy-gtk/empathy-log-window.c | 9 +++++++++
libempathy/empathy-gsettings.h | 1 +
3 files changed, 15 insertions(+), 2 deletions(-)
---
diff --git a/data/empathy-log-window.html b/data/empathy-log-window.html
index 7947177..db93240 100644
--- a/data/empathy-log-window.html
+++ b/data/empathy-log-window.html
@@ -2,9 +2,12 @@
<head>
<style type="text/css">
html, body, div, p {
- /* FIXME: how do we set the application font? */
padding: 0;
- margin: 0;
+ margin: 1px;
+}
+
+body {
+ margin-left: -1em;
}
div.row {
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index bb8b1ce..fdf4333 100644
--- a/libempathy-gtk/empathy-log-window.c
+++ b/libempathy-gtk/empathy-log-window.c
@@ -123,6 +123,7 @@ struct _EmpathyLogWindowPriv
gboolean selected_is_chatroom;
GSettings *gsettings_chat;
+ GSettings *gsettings_desktop;
};
static void log_window_search_entry_changed_cb (GtkWidget *entry,
@@ -548,7 +549,9 @@ 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);
+ tp_clear_object (&self->priv->gsettings_desktop);
tp_clear_object (&self->priv->store_events);
@@ -600,6 +603,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);
+ self->priv->gsettings_desktop = g_settings_new (
+ EMPATHY_PREFS_DESKTOP_INTERFACE_SCHEMA);
gtk_window_set_title (GTK_WINDOW (self), _("History"));
gtk_widget_set_can_focus (GTK_WIDGET (self), FALSE);
@@ -718,6 +723,10 @@ empathy_log_window_init (EmpathyLogWindow *self)
self->priv->webview);
gtk_widget_show (self->priv->webview);
+ empathy_webkit_bind_font_setting (WEBKIT_WEB_VIEW (self->priv->webview),
+ self->priv->gsettings_desktop,
+ EMPATHY_PREFS_DESKTOP_INTERFACE_FONT_NAME);
+
filename = empathy_file_lookup ("empathy-log-window.html", "data");
gfile = g_file_new_for_path (filename);
g_free (filename);
diff --git a/libempathy/empathy-gsettings.h b/libempathy/empathy-gsettings.h
index 60726d1..9c7efb3 100644
--- a/libempathy/empathy-gsettings.h
+++ b/libempathy/empathy-gsettings.h
@@ -92,6 +92,7 @@ G_BEGIN_DECLS
#define EMPATHY_PREFS_DESKTOP_INTERFACE_SCHEMA "org.gnome.desktop.interface"
#define EMPATHY_PREFS_DESKTOP_INTERFACE_DOCUMENT_FONT_NAME "document-font-name"
+#define EMPATHY_PREFS_DESKTOP_INTERFACE_FONT_NAME "font-name"
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]