From 1acc3477eeb71505d68b66ac7aa4a796f86fe69c Mon Sep 17 00:00:00 2001 From: Brent Hull Date: Fri, 25 Jan 2013 02:39:32 -0500 Subject: Port mate-dictionary (and applet) to Gsettings (main program based on GNOME patch) --- mate-dictionary/src/gdict-print.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) (limited to 'mate-dictionary/src/gdict-print.c') diff --git a/mate-dictionary/src/gdict-print.c b/mate-dictionary/src/gdict-print.c index 734f1a54..9e18bd6d 100644 --- a/mate-dictionary/src/gdict-print.c +++ b/mate-dictionary/src/gdict-print.c @@ -28,10 +28,9 @@ #include #include -#include #include - -#include +#include +#include #include @@ -178,19 +177,12 @@ end_print (GtkPrintOperation *operation, static gchar * get_print_font (void) { - MateConfClient *client; - gchar *print_font; - - client = mateconf_client_get_default (); - print_font = mateconf_client_get_string (client, - GDICT_MATECONF_PRINT_FONT_KEY, - NULL); - if (!print_font) - print_font = g_strdup (GDICT_DEFAULT_PRINT_FONT); - - g_object_unref (client); - - return print_font; + static GSettings *settings = NULL; + + if (settings == NULL) + settings = g_settings_new ("org.mate.dictionary"); + + return g_settings_get_string (settings, "print-font"); } void -- cgit v1.2.1