[gedit] Make restoring default print fonts actually work
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] Make restoring default print fonts actually work
- Date: Mon, 28 Nov 2011 08:01:55 +0000 (UTC)
commit 55b929c6508358446b855055c02cec439df4bfae
Author: Paolo Borelli <pborelli gnome org>
Date: Mon Nov 28 09:03:35 2011 +0100
Make restoring default print fonts actually work
We need to reset the gsettings to the original value specified in the
schema.
gedit/gedit-print-job.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/gedit/gedit-print-job.c b/gedit/gedit-print-job.c
index 03caf76..d34218a 100644
--- a/gedit/gedit-print-job.c
+++ b/gedit/gedit-print-job.c
@@ -296,6 +296,13 @@ restore_button_clicked (GtkButton *button,
{
gchar *body, *header, *numbers;
+ g_settings_reset (job->priv->print_settings,
+ GEDIT_SETTINGS_PRINT_FONT_BODY_PANGO);
+ g_settings_reset (job->priv->print_settings,
+ GEDIT_SETTINGS_PRINT_FONT_HEADER_PANGO);
+ g_settings_reset (job->priv->print_settings,
+ GEDIT_SETTINGS_PRINT_FONT_NUMBERS_PANGO);
+
body = g_settings_get_string (job->priv->print_settings,
GEDIT_SETTINGS_PRINT_FONT_BODY_PANGO);
header = g_settings_get_string (job->priv->print_settings,
@@ -306,11 +313,9 @@ restore_button_clicked (GtkButton *button,
gtk_font_button_set_font_name (
GTK_FONT_BUTTON (job->priv->body_fontbutton),
body);
-
gtk_font_button_set_font_name (
GTK_FONT_BUTTON (job->priv->headers_fontbutton),
header);
-
gtk_font_button_set_font_name (
GTK_FONT_BUTTON (job->priv->numbers_fontbutton),
numbers);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]