[vte] widget: Use non-deprecated function to get style font
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] widget: Use non-deprecated function to get style font
- Date: Wed, 9 Apr 2014 18:23:20 +0000 (UTC)
commit 1ab0221efb2cfff9922ce74d3fa24a8af8ba070a
Author: Christian Persch <chpe gnome org>
Date: Wed Apr 9 20:22:36 2014 +0200
widget: Use non-deprecated function to get style font
configure.ac | 2 +-
src/vte.c | 6 ++----
2 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 931c916..87b0c97 100644
--- a/configure.ac
+++ b/configure.ac
@@ -41,7 +41,7 @@ VTE_API_MAJOR_VERSION=2
VTE_API_MINOR_VERSION=91
VTE_API_VERSION=$VTE_API_MAJOR_VERSION.$VTE_API_MINOR_VERSION
GTK_API_VERSION=3.0
-GTK_REQUIRED=3.2.0
+GTK_REQUIRED=3.8.0
GLADE_API_VERSION=2.0
AC_SUBST([VTE_API_VERSION])
diff --git a/src/vte.c b/src/vte.c
index 0eeb708..a1dc1bf 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -7558,8 +7558,7 @@ vte_terminal_set_font(VteTerminal *terminal,
GObject *object;
GtkStyleContext *context;
VteTerminalPrivate *pvt;
- const PangoFontDescription *style_font;
- PangoFontDescription *desc;
+ PangoFontDescription *desc;
gboolean same_desc;
g_return_if_fail(VTE_IS_TERMINAL(terminal));
@@ -7569,8 +7568,7 @@ vte_terminal_set_font(VteTerminal *terminal,
/* Create an owned font description. */
context = gtk_widget_get_style_context(&terminal->widget);
- style_font = gtk_style_context_get_font(context, GTK_STATE_FLAG_NORMAL);
- desc = pango_font_description_copy (style_font);
+ gtk_style_context_get(context, GTK_STATE_FLAG_NORMAL, "font", &desc, NULL);
pango_font_description_set_family_static (desc, "monospace");
if (font_desc != NULL) {
pango_font_description_merge (desc, font_desc, TRUE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]