diff options
author | Stefano Karapetsas <[email protected]> | 2013-01-25 13:41:13 -0800 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2013-01-25 13:41:13 -0800 |
commit | bbf4c3447a09a5e4be8307e3df3b3405781bead2 (patch) | |
tree | bc924a2c5961e629a55bd046765bc7c45e2b5ad0 /mate-dictionary/src/gdict-print.c | |
parent | 3f783bbd74e1f94e97f91829480b32b05b6480c8 (diff) | |
parent | cc8a689bdeb46b3c9fe8247a72b05c8d97762474 (diff) | |
download | mate-utils-bbf4c3447a09a5e4be8307e3df3b3405781bead2.tar.bz2 mate-utils-bbf4c3447a09a5e4be8307e3df3b3405781bead2.tar.xz |
Merge pull request #18 from bhull2010/master
Port mate-dictionary to Gsettings
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 |