diff options
author | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2011-08-09 09:41:11 +0800 |
---|---|---|
committer | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2011-08-09 09:41:11 +0800 |
commit | a23b86b6a47b06cc9b37cafd892b73229c2d97d3 (patch) | |
tree | 2b27bf624f4fa7f0ca36c6c529ee15b4a73e9a5b | |
parent | 3b97f8064e775fd770188b4f186da95706e205f8 (diff) | |
download | gsoc2013-empathy-a23b86b6a47b06cc9b37cafd892b73229c2d97d3.tar gsoc2013-empathy-a23b86b6a47b06cc9b37cafd892b73229c2d97d3.tar.gz gsoc2013-empathy-a23b86b6a47b06cc9b37cafd892b73229c2d97d3.tar.bz2 gsoc2013-empathy-a23b86b6a47b06cc9b37cafd892b73229c2d97d3.tar.lz gsoc2013-empathy-a23b86b6a47b06cc9b37cafd892b73229c2d97d3.tar.xz gsoc2013-empathy-a23b86b6a47b06cc9b37cafd892b73229c2d97d3.tar.zst gsoc2013-empathy-a23b86b6a47b06cc9b37cafd892b73229c2d97d3.zip |
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.
-rw-r--r-- | data/empathy-log-window.html | 7 | ||||
-rw-r--r-- | libempathy-gtk/empathy-log-window.c | 9 | ||||
-rw-r--r-- | 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 794717704..db93240b5 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 bb8b1ce42..fdf433307 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 60726d17e..9c7efb35b 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 |