diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-11-11 22:42:14 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-11-16 16:00:55 +0800 |
commit | 87f228d727344e28bb9d87f6a86845f6473a38b0 (patch) | |
tree | f8369d42520db046adabbf4bf48ba333e1915d01 /libempathy-gtk/empathy-theme-adium.c | |
parent | a908b286fe5cc825f61cee64298395685b81b09d (diff) | |
download | gsoc2013-empathy-87f228d727344e28bb9d87f6a86845f6473a38b0.tar gsoc2013-empathy-87f228d727344e28bb9d87f6a86845f6473a38b0.tar.gz gsoc2013-empathy-87f228d727344e28bb9d87f6a86845f6473a38b0.tar.bz2 gsoc2013-empathy-87f228d727344e28bb9d87f6a86845f6473a38b0.tar.lz gsoc2013-empathy-87f228d727344e28bb9d87f6a86845f6473a38b0.tar.xz gsoc2013-empathy-87f228d727344e28bb9d87f6a86845f6473a38b0.tar.zst gsoc2013-empathy-87f228d727344e28bb9d87f6a86845f6473a38b0.zip |
use gsettings version of the document-font-name key (#626810)
Diffstat (limited to 'libempathy-gtk/empathy-theme-adium.c')
-rw-r--r-- | libempathy-gtk/empathy-theme-adium.c | 32 |
1 files changed, 13 insertions, 19 deletions
diff --git a/libempathy-gtk/empathy-theme-adium.c b/libempathy-gtk/empathy-theme-adium.c index b9b6169ef..5b8989848 100644 --- a/libempathy-gtk/empathy-theme-adium.c +++ b/libempathy-gtk/empathy-theme-adium.c @@ -28,7 +28,6 @@ #include <telepathy-glib/dbus.h> #include <telepathy-glib/util.h> -#include <gconf/gconf-client.h> #include <pango/pango.h> #include <gdk/gdk.h> @@ -48,8 +47,6 @@ #define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, EmpathyThemeAdium) -/* GConf key containing current value of font */ -#define EMPATHY_GCONF_FONT_KEY_NAME "/desktop/gnome/interface/document_font_name" #define BORING_DPI_DEFAULT 96 /* "Join" consecutive messages with timestamps within five minutes */ @@ -981,24 +978,21 @@ theme_adium_inspect_web_view_cb (WebKitWebInspector *inspector, static PangoFontDescription * theme_adium_get_default_font (void) { - GConfClient *gconf_client; + GSettings *gsettings; PangoFontDescription *pango_fd; - gchar *gconf_font_family; + gchar *font_family; - gconf_client = gconf_client_get_default (); - if (gconf_client == NULL) { - return NULL; - } - gconf_font_family = gconf_client_get_string (gconf_client, - EMPATHY_GCONF_FONT_KEY_NAME, - NULL); - if (gconf_font_family == NULL) { - g_object_unref (gconf_client); - return NULL; - } - pango_fd = pango_font_description_from_string (gconf_font_family); - g_free (gconf_font_family); - g_object_unref (gconf_client); + gsettings = g_settings_new (EMPATHY_PREFS_DESKTOP_INTERFACE_SCHEMA); + + font_family = g_settings_get_string (gsettings, + EMPATHY_PREFS_DESKTOP_INTERFACE_DOCUMENT_FONT_NAME); + + if (font_family == NULL) + return NULL; + + pango_fd = pango_font_description_from_string (font_family); + g_free (font_family); + g_object_unref (gsettings); return pango_fd; } |