[gtk+] tests: Don't call to-be-deprecated function
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] tests: Don't call to-be-deprecated function
- Date: Thu, 6 Dec 2012 02:02:17 +0000 (UTC)
commit a405c9917c550b72d8805fce9f29e63ccd57e5ed
Author: Benjamin Otte <otte redhat com>
Date: Thu Dec 6 02:30:57 2012 +0100
tests: Don't call to-be-deprecated function
tests/testcalendar.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/tests/testcalendar.c b/tests/testcalendar.c
index a55e6f3..84de5ec 100644
--- a/tests/testcalendar.c
+++ b/tests/testcalendar.c
@@ -396,7 +396,7 @@ create_calendar(void)
GtkSizeGroup *size;
GtkStyleContext *context;
- const PangoFontDescription *font_desc;
+ PangoFontDescription *font_desc;
gchar *font;
gint i;
@@ -476,10 +476,11 @@ create_calendar(void)
size = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
context = gtk_widget_get_style_context (calendar);
- font_desc = gtk_style_context_get_font (context, GTK_STATE_FLAG_NORMAL);
+ gtk_style_context_get (context, GTK_STATE_FLAG_NORMAL, &font_desc, NULL);
font = pango_font_description_to_string (font_desc);
button = gtk_font_button_new_with_font (font);
g_free (font);
+ pango_font_description_free (font_desc);
g_signal_connect (button, "font-set",
G_CALLBACK(calendar_select_font),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]