tests: Don't call to-be-deprecated function
This commit is contained in:
@ -396,7 +396,7 @@ create_calendar(void)
|
|||||||
|
|
||||||
GtkSizeGroup *size;
|
GtkSizeGroup *size;
|
||||||
GtkStyleContext *context;
|
GtkStyleContext *context;
|
||||||
const PangoFontDescription *font_desc;
|
PangoFontDescription *font_desc;
|
||||||
gchar *font;
|
gchar *font;
|
||||||
gint i;
|
gint i;
|
||||||
|
|
||||||
@ -476,10 +476,11 @@ create_calendar(void)
|
|||||||
size = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
|
size = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
|
||||||
|
|
||||||
context = gtk_widget_get_style_context (calendar);
|
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);
|
font = pango_font_description_to_string (font_desc);
|
||||||
button = gtk_font_button_new_with_font (font);
|
button = gtk_font_button_new_with_font (font);
|
||||||
g_free (font);
|
g_free (font);
|
||||||
|
pango_font_description_free (font_desc);
|
||||||
|
|
||||||
g_signal_connect (button, "font-set",
|
g_signal_connect (button, "font-set",
|
||||||
G_CALLBACK(calendar_select_font),
|
G_CALLBACK(calendar_select_font),
|
||||||
|
|||||||
Reference in New Issue
Block a user