diff options
author | Brent Hull <[email protected]> | 2013-01-25 02:39:32 -0500 |
---|---|---|
committer | Brent Hull <[email protected]> | 2013-01-25 02:39:32 -0500 |
commit | 1acc3477eeb71505d68b66ac7aa4a796f86fe69c (patch) | |
tree | c4c7950e24d8393980b41c6bd649c450e628a6f2 /mate-dictionary/src/gdict-print.c | |
parent | 3f783bbd74e1f94e97f91829480b32b05b6480c8 (diff) | |
download | mate-utils-1acc3477eeb71505d68b66ac7aa4a796f86fe69c.tar.bz2 mate-utils-1acc3477eeb71505d68b66ac7aa4a796f86fe69c.tar.xz |
Port mate-dictionary (and applet) to Gsettings (main program based on GNOME patch)
Diffstat (limited to 'mate-dictionary/src/gdict-print.c')
-rw-r--r-- | mate-dictionary/src/gdict-print.c | 24 |
1 files changed, 8 insertions, 16 deletions
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 <string.h> #include <math.h> -#include <gtk/gtk.h> #include <glib/gi18n.h> - -#include <mateconf/mateconf-client.h> +#include <gio/gio.h> +#include <gtk/gtk.h> #include <libgdict/gdict.h> @@ -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 |