[gedit/gnome-3-2] Make restoring default print fonts actually work
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/gnome-3-2] Make restoring default print fonts actually work
- Date: Fri, 2 Dec 2011 20:51:39 +0000 (UTC)
commit fb834790748704e22de094adaaac3c9fa2da754a
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 c39f76f..15b12e4 100644
--- a/gedit/gedit-print-job.c
+++ b/gedit/gedit-print-job.c
@@ -297,6 +297,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,
@@ -307,11 +314,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]