summaryrefslogtreecommitdiff
path: root/mate-dictionary/src/gdict-print.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2013-01-25 13:41:13 -0800
committerStefano Karapetsas <[email protected]>2013-01-25 13:41:13 -0800
commitbbf4c3447a09a5e4be8307e3df3b3405781bead2 (patch)
treebc924a2c5961e629a55bd046765bc7c45e2b5ad0 /mate-dictionary/src/gdict-print.c
parent3f783bbd74e1f94e97f91829480b32b05b6480c8 (diff)
parentcc8a689bdeb46b3c9fe8247a72b05c8d97762474 (diff)
downloadmate-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.c24
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