[gnome-applets] stickynotes: don't ignore font type
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-applets] stickynotes: don't ignore font type
- Date: Sun, 15 Nov 2015 04:09:35 +0000 (UTC)
commit 75836cbd9198b0ceb55498147932da957d158563
Author: Balló György <ballogyor gmail com>
Date: Mon Nov 2 01:20:55 2015 +0100
stickynotes: don't ignore font type
https://bugzilla.gnome.org/show_bug.cgi?id=753272
stickynotes/stickynotes.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/stickynotes/stickynotes.c b/stickynotes/stickynotes.c
index 61dd742..5ff4294 100644
--- a/stickynotes/stickynotes.c
+++ b/stickynotes/stickynotes.c
@@ -539,7 +539,7 @@ stickynote_set_color (StickyNote *note,
void
stickynote_set_font (StickyNote *note, const gchar *font_str, gboolean save)
{
- GtkRcStyle *rc_style = gtk_widget_get_modifier_style(note->w_window);
+ PangoFontDescription *font_desc;
gchar *font_str_actual;
if (save) {
@@ -563,17 +563,15 @@ stickynote_set_font (StickyNote *note, const gchar *font_str, gboolean save)
font_str_actual = g_strdup (font_str);
/* Do not use custom fonts if "use_system_font" is enabled */
- pango_font_description_free (rc_style->font_desc);
- rc_style->font_desc = font_str_actual ?
+ font_desc = font_str_actual ?
pango_font_description_from_string (font_str_actual): NULL;
- g_object_ref (G_OBJECT (rc_style));
/* Apply the style to the widgets */
- gtk_widget_modify_style(note->w_window, rc_style);
- gtk_widget_modify_style(note->w_body, rc_style);
+ gtk_widget_override_font (note->w_window, font_desc);
+ gtk_widget_override_font (note->w_body, font_desc);
g_free (font_str_actual);
- g_object_unref (G_OBJECT(rc_style));
+ pango_font_description_free (font_desc);
}
/* Lock/Unlock a sticky note from editing */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]