diff options
author | Javier Jardón <jjardon@gnome.org> | 2011-05-29 16:45:40 +0200 |
---|---|---|
committer | Javier Jardón <jjardon@gnome.org> | 2011-05-31 19:12:24 +0200 |
commit | e5c7daa828977999ac8b8c2bd64ef3a6077ed23d (patch) | |
tree | e5ea3c0f431f0dd92a16d9d9bc4bccc22b4e3c15 /tests/testcalendar.c | |
parent | 20433efbfaf462ac155b90a64a5e83c9a3b3f2e1 (diff) | |
download | gtk+-e5c7daa828977999ac8b8c2bd64ef3a6077ed23d.tar.gz |
tests: avoid boxed structs copying where possible
Use the GtkStyleContext accessors for boxed properties where possible,
to reduce allocations.
Diffstat (limited to 'tests/testcalendar.c')
-rw-r--r-- | tests/testcalendar.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/testcalendar.c b/tests/testcalendar.c index a0292760a2..a71b5cc886 100644 --- a/tests/testcalendar.c +++ b/tests/testcalendar.c @@ -477,10 +477,9 @@ create_calendar(void) size = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL); context = gtk_widget_get_style_context (calendar); - gtk_style_context_get (context, 0, "font", &font_desc, NULL); + font_desc = gtk_style_context_get_font (context, GTK_STATE_FLAG_NORMAL); font = pango_font_description_to_string (font_desc); button = gtk_font_button_new_with_font (font); - pango_font_description_free (font_desc); g_free (font); g_signal_connect (button, "font-set", |